diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-04-15 09:17:21 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-04-15 09:17:21 -0500 |
commit | fd5fac8de3af29f2d7a3ccd985092f9e14361026 (patch) | |
tree | b5c3370064bcb8e23329b3c98c754b5616098a7b /src/indicator-power.c | |
parent | 22a82f675f9552756ecac17b0a53a09bb20d1b46 (diff) | |
download | ayatana-indicator-power-fd5fac8de3af29f2d7a3ccd985092f9e14361026.tar.gz ayatana-indicator-power-fd5fac8de3af29f2d7a3ccd985092f9e14361026.tar.bz2 ayatana-indicator-power-fd5fac8de3af29f2d7a3ccd985092f9e14361026.zip |
fix leaked strings in menu_add_device when (kind == UP_DEVICE_KIND_LINE_POWER)
Diffstat (limited to 'src/indicator-power.c')
-rw-r--r-- | src/indicator-power.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index 701415d..ea831e5 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -510,7 +510,7 @@ static GIcon* get_device_icon (UpDeviceKind kind, UpDeviceState state, guint64 time_sec, - gchar *device_icon) + const gchar *device_icon) { GIcon *gicon; @@ -553,8 +553,8 @@ menu_add_device (GtkMenu *menu, GtkWidget *details_label; GtkWidget *grid; GIcon *device_gicons; - gchar *device_icon = NULL; - gchar *object_path = NULL; + const gchar *device_icon = NULL; + const gchar *object_path = NULL; gdouble percentage; guint64 time; const gchar *device_name; @@ -566,7 +566,7 @@ menu_add_device (GtkMenu *menu, return; g_variant_get (device, - "(susdut)", + "(&su&sdut)", &object_path, &kind, &device_icon, @@ -607,8 +607,6 @@ menu_add_device (GtkMenu *menu, g_free (short_details); g_free (details); g_free (accessible_name); - g_free (device_icon); - g_free (object_path); } static gsize |