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 312017 - Memory leak in gimp_ui_manager_ui_popup
Memory leak in gimp_ui_manager_ui_popup
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-07-29 23:14 UTC by Robert Ögren
Modified: 2005-08-06 14:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested patch (584 bytes, patch)
2005-07-29 23:15 UTC, Robert Ögren
accepted-commit_now Details | Review

Description Robert Ögren 2005-07-29 23:14:59 UTC
While investigating an unrelated ref leak in GTK+, I discovered a memory leak in
gimp_ui_manager_ui_popup. It calls gtk_get_current_event (which according to the
docs returns a copy of the event) but doesn't free that copy with
gdk_event_free. This causes a small memory leak as well as leaked references to
the window the event refers to.
Comment 1 Robert Ögren 2005-07-29 23:15:37 UTC
Created attachment 49960 [details] [review]
Suggested patch
Comment 2 Michael Natterer 2005-07-29 23:58:55 UTC
Looks fine. Please commit.
Comment 3 Michael Natterer 2005-08-06 14:37:55 UTC
Fixed in CVS:

2005-08-06  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.c (gimp_ui_manager_ui_popup): applied
	patch from Robert Ãgren that frees the event returned by
	gtk_get_current_event(). Fixes bug #312017.