aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-17 14:42:05 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-03-17 14:42:05 -0500
commit04891491daee1cfe70aa7652deb09595f379153d (patch)
treeb47b2260b69c0723191c0c22e33213597a467af0 /src
parent0ef46e198d8632a55713196b2f7edd96d1e1bd78 (diff)
downloadayatana-indicator-power-04891491daee1cfe70aa7652deb09595f379153d.tar.gz
ayatana-indicator-power-04891491daee1cfe70aa7652deb09595f379153d.tar.bz2
ayatana-indicator-power-04891491daee1cfe70aa7652deb09595f379153d.zip
fix variant leaks in menu_add_devices()
Diffstat (limited to 'src')
-rw-r--r--src/indicator-power.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 6140c54..ff56fda 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -615,7 +615,6 @@ static gsize
menu_add_devices (GtkMenu *menu,
GVariant *devices)
{
- GVariant *device;
gsize n_devices;
guint i;
@@ -627,8 +626,9 @@ menu_add_devices (GtkMenu *menu,
for (i = 0; i < n_devices; i++)
{
- device = g_variant_get_child_value (devices, i);
+ GVariant * device = g_variant_get_child_value (devices, i);
menu_add_device (menu, device);
+ g_variant_unref (device);
}
return n_devices;