[empathy] theme-manager: clean up memory releasing



commit 10fc10c0be71a31064298776b7d1abc412157dc8
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Wed Jun 20 20:14:39 2012 +1000

    theme-manager: clean up memory releasing

 libempathy-gtk/empathy-theme-manager.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index a04a43a..ff53c95 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -161,15 +161,13 @@ theme_manager_notify_adium_path_cb (GSettings   *gsettings_chat,
 
 	/* If path did not really changed, ignore */
 	if (!tp_strdiff (current_path, new_path)) {
-		g_free (new_path);
-		return;
+		goto finally;
 	}
 
 	/* If path does not really contains an adium path, ignore */
 	if (!empathy_adium_path_is_valid (new_path)) {
 		DEBUG ("Invalid theme path set: %s", new_path);
-		g_free (new_path);
-		return;
+		goto finally;
 	}
 
 	/* Load new theme data, we can stop tracking existing views since we
@@ -180,6 +178,7 @@ theme_manager_notify_adium_path_cb (GSettings   *gsettings_chat,
 
 	theme_manager_emit_changed (manager);
 
+finally:
 	g_free (new_path);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]