diff options
-rw-r--r-- | libempathy-gtk/empathy-theme-manager.c | 8 |
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; } |