aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-08-11 17:39:21 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-08-11 17:39:21 +0100
commit632244509d85412748cc2b024a5d92b43306034d (patch)
tree30a49a682363b01fc8a84ce6a15ece85eab53810
parent7a2c59a355b603ac04c317f97d6bdb8f7988e2b4 (diff)
downloadayatana-indicator-power-632244509d85412748cc2b024a5d92b43306034d.tar.gz
ayatana-indicator-power-632244509d85412748cc2b024a5d92b43306034d.tar.bz2
ayatana-indicator-power-632244509d85412748cc2b024a5d92b43306034d.zip
Fix some memory leaks
-rw-r--r--src/indicator-power.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 2179c3f..dbc1d6a 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -306,6 +306,9 @@ build_device_time_details (const gchar *device_name,
device_name, short_timestring);
}
}
+
+ g_free (short_timestring);
+ g_free (detailed_timestring);
}
else
{
@@ -401,6 +404,9 @@ menu_add_device (GtkMenu *menu,
G_CALLBACK (show_info_cb), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ g_free (short_details);
+ g_free (details);
+ g_free (accesible_name);
g_free (device_icon);
g_free (object_path);
}
@@ -450,6 +456,7 @@ build_menu (IndicatorPower *self)
children = gtk_container_get_children (GTK_CONTAINER (priv->menu));
g_list_foreach (children, (GFunc) gtk_widget_destroy, NULL);
+ g_list_free (children);
/* devices */
n_devices = menu_add_devices (priv->menu, priv->devices);
@@ -610,6 +617,7 @@ put_primary_device (IndicatorPower *self,
g_free (short_details);
g_free (details);
+ g_free (accesible_name);
g_free (device_icon);
g_free (object_path);
}