summaryrefslogtreecommitdiff
path: root/gtk/gtkmenutrackeritem.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-28 22:39:43 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-28 22:39:43 -0400
commit6f0951845f819a082d7428f2c2b4fa12d2ef7788 (patch)
treed1a11eeeb5697f55616fd5aa71cff5faeb2588ad /gtk/gtkmenutrackeritem.c
parentd1439195279b1bcf193e9abe44e033c0c3ea66b2 (diff)
downloadgtk+-6f0951845f819a082d7428f2c2b4fa12d2ef7788.tar.gz
GtkMenuTrackerItem: Plug a memory leak
gtk_menu_tracker_get_[verb_]icon both return a reference, so don't use g_value_set_object, which adds another one.
Diffstat (limited to 'gtk/gtkmenutrackeritem.c')
-rw-r--r--gtk/gtkmenutrackeritem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkmenutrackeritem.c b/gtk/gtkmenutrackeritem.c
index 232ac37df6..799f929a36 100644
--- a/gtk/gtkmenutrackeritem.c
+++ b/gtk/gtkmenutrackeritem.c
@@ -164,10 +164,10 @@ gtk_menu_tracker_item_get_property (GObject *object,
g_value_set_string (value, gtk_menu_tracker_item_get_label (self));
break;
case PROP_ICON:
- g_value_set_object (value, gtk_menu_tracker_item_get_icon (self));
+ g_value_take_object (value, gtk_menu_tracker_item_get_icon (self));
break;
case PROP_VERB_ICON:
- g_value_set_object (value, gtk_menu_tracker_item_get_verb_icon (self));
+ g_value_take_object (value, gtk_menu_tracker_item_get_verb_icon (self));
break;
case PROP_SENSITIVE:
g_value_set_boolean (value, gtk_menu_tracker_item_get_sensitive (self));
@@ -199,6 +199,7 @@ gtk_menu_tracker_item_finalize (GObject *object)
GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (object);
g_free (self->action_namespace);
+ g_free (self->action_and_target);
if (self->observable)
g_object_unref (self->observable);