]> git.0d.be Git - empathy.git/commitdiff
theme-manager: clean up memory releasing
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Wed, 20 Jun 2012 10:14:39 +0000 (20:14 +1000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 2 Jul 2012 08:03:22 +0000 (10:03 +0200)
libempathy-gtk/empathy-theme-manager.c

index a04a43a05d330eec875af0f85c845ca229395535..ff53c9594dcf9db85631406d7e82969700ac1fff 100644 (file)
@@ -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);
 }