aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/calendar-weather
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-15 02:15:36 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-15 02:15:36 +0800
commit4b9ac3879d25d14cbaaab9237626257c3561f7ff (patch)
treef9a445d2652644ea9ed64da2cd76f1ad442e83b3 /plugins/calendar-weather
parentcf41379058d6e78ea138603186acb8174c58e0ca (diff)
downloadgsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.gz
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.bz2
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.lz
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.xz
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.zst
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.zip
Fix few memory leaks
Diffstat (limited to 'plugins/calendar-weather')
-rw-r--r--plugins/calendar-weather/calendar-weather.c8
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;
}