diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-15 02:15:36 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:35 +0800 |
commit | a4e2599f950cd2379a18a4c39cd27f87f090d492 (patch) | |
tree | fb1e71901c4824a0666f40d02c58a3ec72c9033c /plugins/calendar-weather | |
parent | ecbb0bce4a854e7b617566f43a0b97f85bc63217 (diff) | |
download | gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.gz gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.bz2 gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.lz gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.xz gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.zst gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.zip |
Fix few memory leaks
Diffstat (limited to 'plugins/calendar-weather')
-rw-r--r-- | plugins/calendar-weather/calendar-weather.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c index 45cb5c48ed..f9d1180429 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -49,7 +49,7 @@ gint e_plugin_lib_enable (EPlugin *epl, gint enable); gint e_plugin_lib_enable (EPlugin *epl, gint enable) { - GList *l; + GList *l, *saved_cats; const gchar *tmp; gint ii; @@ -71,8 +71,10 @@ e_plugin_lib_enable (EPlugin *epl, gint enable) tmp = _(categories[0].description); + saved_cats = e_categories_get_list (); + /* Add the categories icons if we don't have them. */ - for (l = e_categories_get_list (); l; l = g_list_next (l)) { + for (l = saved_cats; l; l = g_list_next (l)) { if (!strcmp ((const gchar *)l->data, tmp)) goto exit; } @@ -88,6 +90,8 @@ e_plugin_lib_enable (EPlugin *epl, gint enable) } exit: + g_list_free (saved_cats); + return 0; } |