diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-04-09 14:16:07 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-04-09 14:16:07 -0500 |
commit | 45bc12d01cb4b692f55f6bb4cf4fd663e17d34fc (patch) | |
tree | 90ae540237187f0bdab557e705305010411aec05 | |
parent | 7a5b5a693c25cac5ca547d4e0f834c017cacf837 (diff) | |
download | ayatana-indicator-power-45bc12d01cb4b692f55f6bb4cf4fd663e17d34fc.tar.gz ayatana-indicator-power-45bc12d01cb4b692f55f6bb4cf4fd663e17d34fc.tar.bz2 ayatana-indicator-power-45bc12d01cb4b692f55f6bb4cf4fd663e17d34fc.zip |
leak fix 3 of 3: don't leak the GIcons returned by get_device_icon()
-rw-r--r-- | src/indicator-power.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index 9a474bd..19eff87 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -585,6 +585,7 @@ menu_add_device (GtkMenu *menu, device_gicons = get_device_icon (kind, state, time, device_icon); icon = gtk_image_new_from_gicon (device_gicons, GTK_ICON_SIZE_SMALL_TOOLBAR); + g_clear_object (&device_gicons); device_name = device_kind_to_localised_string (kind); @@ -811,6 +812,7 @@ put_primary_device (IndicatorPower *self, gtk_image_set_from_gicon (self->status_image, device_gicons, GTK_ICON_SIZE_LARGE_TOOLBAR); + g_clear_object (&device_gicons); gtk_widget_show (GTK_WIDGET (self->status_image)); |