aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Vasin <rat4vier@gmail.com>2012-10-07 17:47:08 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-10-08 15:55:59 +0800
commit3ca6b8a0f122833556e500c0dd0cfb3227180fa1 (patch)
treea8a7b86a0e39463e3a4668edd60dd4822f78fade
parentb46b9e3ec8dd67359b1e1b2b20678f6c322d41b3 (diff)
downloadgsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.tar
gsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.tar.gz
gsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.tar.bz2
gsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.tar.lz
gsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.tar.xz
gsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.tar.zst
gsoc2013-empathy-3ca6b8a0f122833556e500c0dd0cfb3227180fa1.zip
empathy_theme_manager_dup_theme_name_from_path(): fix mem leaks
https://bugzilla.gnome.org/show_bug.cgi?id=685652
-rw-r--r--libempathy-gtk/empathy-theme-manager.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index fd58ac49d..6c66c2502 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -440,19 +440,21 @@ empathy_theme_manager_find_theme (const gchar *name)
gchar *
empathy_theme_manager_dup_theme_name_from_path (const gchar *path)
{
- gchar *fullname, *result;
- gchar **tmp;
+ gchar *fullname = NULL, *result = NULL;
+ gchar **tmp = NULL;
if (path == NULL)
return NULL;
fullname = g_path_get_basename (path);
if (!g_str_has_suffix (fullname, ".AdiumMessageStyle"))
- return NULL;
+ goto out;
tmp = g_strsplit (fullname, ".AdiumMessageStyle", 0);
result = g_strdup (tmp[0]);
+out:
g_strfreev (tmp);
+ g_free (fullname);
return result;
}