RSS/Atom feed Twitter
Site is read-only, email is disabled

Fixes for memory leaks

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

6 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

Fixes for memory leaks Nelson A. de Oliveira 18 Nov 02:31
  Fixes for memory leaks Martin Nordholts 18 Nov 07:23
   Fixes for memory leaks Nelson A. de Oliveira 18 Nov 22:57
    Fixes for memory leaks Nelson A. de Oliveira 19 Nov 02:19
     Fixes for memory leaks Michael Natterer 19 Nov 14:19
  Fixes for memory leaks Michael Natterer 19 Nov 14:43
Nelson A. de Oliveira
2009-11-18 02:31:58 UTC (about 15 years ago)

Fixes for memory leaks

Hi!

While giving a look at bug #595605 (from Gimp Bugzilla), I have remembered about cppcheck.
I have created a patch available at

http://people.debian.org/~naoliv/misc/gimp-mememleak.diff

fixing (I hope) some leakages inside the plug-ins dir. Can somebody review it, please?

There are some errors remaining (that or seemed to be unnecessary to fix or I couldn't find an easy way to fix):

[./common/file-compressor.c:775]: (error) Memory leak: filename_copy [./common/file-xmc.c:888]: (error) Memory leak: positions [./common/mail.c:610]: (error) Memory leak: filename_copy [./common/plugin-browser.c:329]: (error) Memory leak: tmp_ptr [./common/plugin-browser.c:355]: (error) Memory leak: leaf_ptr [./file-psd/psd-util.c:200]: (error) Memory leak: pascal_str [./flame/libifs.c:1234]: (error) Memory leak: points [./file-xjt/xjt.c:3138]: (error) Memory leak: l_file_buff [./gfig/gfig-star.c:222]: (error) Memory leak: line_pnts [./gfig/gfig-star.c:222]: (error) Memory leak: min_max

A run on the full source code of gimp (version is the latest one from git), also gives some messages:
http://people.debian.org/~naoliv/misc/gimp-ccpcheck.txt

Thank you!

Best regards, Nelson

Martin Nordholts
2009-11-18 07:23:49 UTC (about 15 years ago)

Fixes for memory leaks

Nelson A. de Oliveira wrote:

Hi!

While giving a look at bug #595605 (from Gimp Bugzilla), I have remembered about cppcheck.
I have created a patch available at

http://people.debian.org/~naoliv/misc/gimp-mememleak.diff

Hi!

Please generate the patch as a commit according to these instructions: http://gimp.org/bugs/howtos/submit-patch.html

Thanks!

A run on the full source code of gimp (version is the latest one from git), also gives some messages:
http://people.debian.org/~naoliv/misc/gimp-ccpcheck.txt

Interesting. Most leaks are for tests or plug-ins though which are less crucial, but there are four leaks in the core.

Regards, Martin

Nelson A. de Oliveira
2009-11-18 22:57:34 UTC (about 15 years ago)

Fixes for memory leaks

Hi!

On Wed, Nov 18, 2009 at 4:23 AM, Martin Nordholts wrote:

Please generate the patch as a commit according to these instructions: http://gimp.org/bugs/howtos/submit-patch.html

Patch available at
http://people.debian.org/~naoliv/misc/0001-Fix-memleaks-in-plug-ins.patch

A run on the full source code of gimp (version is the latest one from git), also gives some messages:
http://people.debian.org/~naoliv/misc/gimp-ccpcheck.txt

Interesting. Most leaks are for tests or plug-ins though which are less crucial, but there are four leaks in the core.

There are also possible memleaks: http://people.debian.org/~naoliv/misc/gimp-possible-memleaks.txt

Best regards, Nelsob

Nelson A. de Oliveira
2009-11-19 02:19:37 UTC (about 15 years ago)

Fixes for memory leaks

Hi again!

I gave another look on the possible mem leaks and created another patch: http://people.debian.org/~naoliv/misc/0001-Fix-memory-leakages.patch

Can somebody review them, please? There is both
http://people.debian.org/~naoliv/misc/0001-Fix-memleaks-in-plug-ins.patch http://people.debian.org/~naoliv/misc/0001-Fix-memory-leakages.patch

Thank you!

Best regards, Nelson

Michael Natterer
2009-11-19 14:19:52 UTC (about 15 years ago)

Fixes for memory leaks

On Wed, 2009-11-18 at 23:19 -0200, Nelson A. de Oliveira wrote:

Hi again!

I gave another look on the possible mem leaks and created another patch: http://people.debian.org/~naoliv/misc/0001-Fix-memory-leakages.patch

Can somebody review them, please? There is both
http://people.debian.org/~naoliv/misc/0001-Fix-memleaks-in-plug-ins.patch http://people.debian.org/~naoliv/misc/0001-Fix-memory-leakages.patch

I'm afraid all your changes to app/pdb are bogus because these files are generated *and* there are no leaks. All the g_value_take_foo() functions take ownership of the passed things.

ciao, --mitch

Michael Natterer
2009-11-19 14:43:09 UTC (about 15 years ago)

Fixes for memory leaks

On Tue, 2009-11-17 at 23:31 -0200, Nelson A. de Oliveira wrote:

A run on the full source code of gimp (version is the latest one from git), also gives some messages:
http://people.debian.org/~naoliv/misc/gimp-ccpcheck.txt

I plugged the leak in dockable_toggle_view_cmd_callback()

commit e466da861638571ac22ba3e37f8b99d7d72bf846 Author: Michael Natterer
Date: Thu Nov 19 14:40:25 2009 +0100

Plug memleak found by Nelson A. de Oliveira

app/actions/dockable-commands.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)

thanks, --mitch