From 742fa8cb32af80698ca9e03dafa10a2d9f1d4701 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 16 Mar 2012 15:39:11 -0500 Subject: fix minor memory leak when the proxy name changes --- libindicator/indicator-service-manager.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libindicator') diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index f58c148..33b0557 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -536,8 +536,8 @@ service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_n { IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data); - const gchar * new_name = NULL; - const gchar * prev_name = NULL; + gchar * new_name = NULL; + gchar * prev_name = NULL; g_variant_get(parameters, "(&s&s&s)", NULL, &prev_name, &new_name); if (new_name == NULL || new_name[0] == 0) { @@ -571,6 +571,9 @@ service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_n } } + g_free (new_name); + g_free (prev_name); + return; } -- cgit v1.2.3 From 3440ebedbc55382f36b9b74eab08c98d99ba206d Mon Sep 17 00:00:00 2001 From: Hernando Torque Date: Mon, 26 Mar 2012 15:35:57 +0200 Subject: Free GError. --- libindicator/indicator-image-helper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libindicator') diff --git a/libindicator/indicator-image-helper.c b/libindicator/indicator-image-helper.c index 23b08d0..5d2ff76 100644 --- a/libindicator/indicator-image-helper.c +++ b/libindicator/indicator-image-helper.c @@ -74,6 +74,9 @@ refresh_image (GtkImage * image) if (pixbuf == NULL) { g_warning("Unable to load icon from file '%s' because: %s", icon_filename, error == NULL ? "I don't know" : error->message); + if (error != NULL) { + g_error_free(error); + } gtk_image_clear(image); return; } -- cgit v1.2.3