diff options
author | Milan Crha <mcrha@redhat.com> | 2014-04-25 00:58:34 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-04-25 00:59:16 +0800 |
commit | fdde33396195d6287e9b582e7ffe8a3bff453e84 (patch) | |
tree | 2349890c4111d28dd5ac4f90629d211143e08889 /e-util/gal-view-instance.c | |
parent | f6d59b3008cb3a41a160ec018761108d042d3159 (diff) | |
download | gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.tar gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.tar.gz gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.tar.bz2 gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.tar.lz gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.tar.xz gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.tar.zst gsoc2013-evolution-fdde33396195d6287e9b582e7ffe8a3bff453e84.zip |
Fix various memory leaks
Diffstat (limited to 'e-util/gal-view-instance.c')
-rw-r--r-- | e-util/gal-view-instance.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/e-util/gal-view-instance.c b/e-util/gal-view-instance.c index d74dc8db9f..26e01c3f93 100644 --- a/e-util/gal-view-instance.c +++ b/e-util/gal-view-instance.c @@ -273,7 +273,9 @@ load_current_view (GalViewInstance *instance) } if (doc == NULL) { - instance->current_id = g_strdup (gal_view_instance_get_default_view (instance)); + gchar *view_id = g_strdup (gal_view_instance_get_default_view (instance)); + g_free (instance->current_id); + instance->current_id = view_id; if (instance->current_id) { gint index = gal_view_collection_get_view_index_by_id ( @@ -291,6 +293,7 @@ load_current_view (GalViewInstance *instance) } root = xmlDocGetRootElement (doc); + g_free (instance->current_id); instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL); if (instance->current_id != NULL) { |