diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-15 02:15:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-15 02:15:36 +0800 |
commit | 4b9ac3879d25d14cbaaab9237626257c3561f7ff (patch) | |
tree | f9a445d2652644ea9ed64da2cd76f1ad442e83b3 /plugins | |
parent | cf41379058d6e78ea138603186acb8174c58e0ca (diff) | |
download | gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.gz gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.zst gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.zip |
Fix few memory leaks
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/calendar-weather/calendar-weather.c | 8 | ||||
-rw-r--r-- | plugins/templates/templates.c | 2 |
2 files changed, 6 insertions, 4 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; } diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c index 3e3bb49195..fd8f8021f7 100644 --- a/plugins/templates/templates.c +++ b/plugins/templates/templates.c @@ -629,8 +629,6 @@ build_template_menus_recurse (GtkUIManager *ui_manager, if (template == NULL) continue; - g_object_ref (template); - action_label = camel_mime_message_get_subject (template); if (action_label == NULL || *action_label == '\0') |