Merge lp:~charlesk/appmenu-gtk/lp-830260 into lp:appmenu-gtk/0.4

Proposed by Charles Kerr
Status: Merged
Approved by: Charles Kerr
Approved revision: 147
Merged at revision: 147
Proposed branch: lp:~charlesk/appmenu-gtk/lp-830260
Merge into: lp:appmenu-gtk/0.4
Diff against target: 21 lines (+4/-0)
1 file modified
src/bridge.c (+4/-0)
To merge this branch: bzr merge lp:~charlesk/appmenu-gtk/lp-830260
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+96018@code.launchpad.net

Description of the change

appmenu-gtk leaks references due to it calling g_object_get() on GObjects, and not calling g_object_unref on them afterwards. Misstakenly reported as a Gtk bug first: https://bugzilla.gnome.org/show_bug.cgi?id=656486

Report & patch submitted by Stian Skjelstad in Bug #830260

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

Good work!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bridge.c'
2--- src/bridge.c 2012-02-08 15:45:02 +0000
3+++ src/bridge.c 2012-03-05 22:49:17 +0000
4@@ -825,6 +825,8 @@
5 g_object_get (widget, "attach-widget", &attach, NULL);
6
7 rebuild (bridge, attach);
8+
9+ g_clear_object (&attach);
10 }
11 }
12
13@@ -885,6 +887,8 @@
14 {
15 DbusmenuMenuitem *mi = dbusmenu_gtk_parse_get_cached_item (attach);
16
17+ g_object_unref (attach);
18+
19 if (mi != NULL)
20 {
21 DbusmenuMenuitem *child_dmi = dbusmenu_gtk_parse_menu_structure (child);

Subscribers

People subscribed via source and target branches