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 305994 - Possible memory leak in gimp-2.3.0/libgimpwidgets/gimpenumwidgets.c, function gimp_enum_stock_box_set_child_padding
Possible memory leak in gimp-2.3.0/libgimpwidgets/gimpenumwidgets.c, function...
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.3.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-05-31 04:51 UTC by Ted Kremenek
Modified: 2008-01-15 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ted Kremenek 2005-05-31 04:51:40 UTC
In file: gimp-2.3.0/libgimpwidgets/gimpenumwidgets.c
function: gimp_enum_stock_box_set_child_padding

/* At line 411 memory is allocated by gtk_container_get_children */
  for (list = gtk_container_get_children (GTK_CONTAINER (stock_box));
       list;
       list = g_list_next (list))
...

The list is then iterated, but never freed.  It looks like the programmer did not know that 
gtk_container_get_children returns new memory (which it is my understanding that is the case).

This possible memory leak was found using a static analysis tool.
Comment 1 Sven Neumann 2005-05-31 10:47:47 UTC
Thanks for spotting our memleaks :)

2005-05-31  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpenumwidgets.c
	(gimp_enum_stock_box_set_child_padding): don't leak the return
	value of gtk_container_get_children (bug #305994, spotted by Ted
	Kremenek).