aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-08-24 11:55:44 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-08-24 11:55:44 +0100
commitbc4d8d425ada55b3bf707b9d65893cd53cdd81a1 (patch)
treeb878436cd97aa44e663d4e4cb56943aa7a10b447 /src
parent8f2d9f2e63cb6cc5f9d4a72985c42fe8ca4adb6e (diff)
downloadayatana-indicator-power-bc4d8d425ada55b3bf707b9d65893cd53cdd81a1.tar.gz
ayatana-indicator-power-bc4d8d425ada55b3bf707b9d65893cd53cdd81a1.tar.bz2
ayatana-indicator-power-bc4d8d425ada55b3bf707b9d65893cd53cdd81a1.zip
Fix a memory leak
Fixes https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/779185
Diffstat (limited to 'src')
-rw-r--r--src/indicator-power.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 7f9e479..3be04be 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -496,7 +496,7 @@ build_menu (IndicatorPower *self)
gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), item);
/* preferences */
- item = gtk_image_menu_item_new_with_mnemonic (_("Power Settings..."));
+ item = gtk_image_menu_item_new_with_label (_("Power Settings..."));
image = gtk_image_new_from_icon_name (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (G_OBJECT (item), "activate",
@@ -661,6 +661,7 @@ get_devices_cb (GObject *source_object,
return;
}
priv->devices = g_variant_get_child_value (devices_container, 0);
+ g_variant_unref (devices_container);
priv->device = get_primary_device (priv->devices);
if (priv->device == NULL)