diff options
author | Chow Loong Jin <hyperair@ubuntu.com> | 2011-01-21 13:56:12 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-21 13:56:12 -0600 |
commit | d063c76ab016d7023152b522c347575b61492eb9 (patch) | |
tree | 6c9efc7505953dea3b9c65ea6a636d70c1f949e4 /src/indicator-messages.c | |
parent | 89410525b2edd4bd1bb77ac238ed3ac5223660d4 (diff) | |
download | ayatana-indicator-messages-d063c76ab016d7023152b522c347575b61492eb9.tar.gz ayatana-indicator-messages-d063c76ab016d7023152b522c347575b61492eb9.tar.bz2 ayatana-indicator-messages-d063c76ab016d7023152b522c347575b61492eb9.zip |
Memory leaks fixes
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 6fd6c5c..0f5fa31 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -571,6 +571,7 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * value, width, height, GDK_INTERP_BILINEAR); + g_object_unref(pixbuf); } else { g_debug("Happy with icon sized %dx%d", gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); resized_pixbuf = pixbuf; @@ -578,10 +579,7 @@ indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * value, gtk_image_set_from_pixbuf(GTK_IMAGE(mi_data->icon), resized_pixbuf); - /* The other pixbuf should be free'd by the dbusmenu. */ - if (resized_pixbuf != pixbuf) { - g_object_unref(resized_pixbuf); - } + g_object_unref(resized_pixbuf); gtk_widget_show(mi_data->icon); } else { @@ -633,6 +631,7 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm width, height, GDK_INTERP_BILINEAR); + g_object_unref(pixbuf); } else { g_debug("Happy with icon sized %dx%d", gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); resized_pixbuf = pixbuf; @@ -640,10 +639,7 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm gtk_image_set_from_pixbuf(GTK_IMAGE(mi_data->icon), resized_pixbuf); - /* The other pixbuf should be free'd by the dbusmenu. */ - if (resized_pixbuf != pixbuf) { - g_object_unref(resized_pixbuf); - } + g_object_unref(resized_pixbuf); } gtk_misc_set_alignment(GTK_MISC(mi_data->icon), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(hbox), mi_data->icon, FALSE, FALSE, padding); |