[empathy] empathy_theme_manager_dup_theme_name_from_path(): fix mem leaks
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy_theme_manager_dup_theme_name_from_path(): fix mem leaks
- Date: Mon, 8 Oct 2012 07:56:24 +0000 (UTC)
commit 3ca6b8a0f122833556e500c0dd0cfb3227180fa1
Author: Pavel Vasin <rat4vier gmail com>
Date: Sun Oct 7 13:47:08 2012 +0400
empathy_theme_manager_dup_theme_name_from_path(): fix mem leaks
https://bugzilla.gnome.org/show_bug.cgi?id=685652
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 fd58ac4..6c66c25 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]