After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 305992 - Potential Memory Leak in app/config/gimprc-serialize.c::gimp_rc_serialize_properties_diff
Potential Memory Leak in app/config/gimprc-serialize.c::gimp_rc_serialize_pro...
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.3.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-05-31 04:41 UTC by Ted Kremenek
Modified: 2008-01-15 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ted Kremenek 2005-05-31 04:41:32 UTC
I am a researcher in the Stanford Checker group.

My static analysis tool has found a potential memory leak in:

file: app/config/gimprc-serialize.c
function: gimp_rc_serialize_properties_diff

/* LINE 78: memory is allocated */

  diff = gimp_config_diff (G_OBJECT (config),
                           G_OBJECT (compare), GIMP_CONFIG_PARAM_SERIALIZE);
...

/* LINE 92, memory is (potentially) leaked when we return FALSE */

      if (! gimp_config_serialize_property (config, prop_spec, writer))
        return FALSE;

This possible bug was found using a static analysis tool.
Comment 1 Sven Neumann 2005-05-31 10:49:30 UTC
2005-05-31  Sven Neumann  <sven@gimp.org>

	* app/config/gimprc-serialize.c (gimp_rc_serialize_properties_diff):
	don't leak the GList in the unlikely case of an error (bug #305992,
	spotted by Ted Kremenek).