aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-05-31 16:44:49 +0800
committerMilan Crha <mcrha@redhat.com>2012-05-31 16:44:49 +0800
commit71924fc48776c642fe8520febc384250cf55973c (patch)
tree6b2f1738675f111dfb664805f82ad27add135715 /modules/mail
parentc88d3170304e1892b221d0581a3cd3c767de4281 (diff)
downloadgsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.tar
gsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.tar.gz
gsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.tar.bz2
gsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.tar.lz
gsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.tar.xz
gsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.tar.zst
gsoc2013-evolution-71924fc48776c642fe8520febc384250cf55973c.zip
Fix memory leaks around gtk_tree_model_get() function
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/em-mailer-prefs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index d81656f997..cf20b8f777 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -364,9 +364,12 @@ emmp_header_add_sensitivity (EMMailerPrefs *prefs)
-1);
if (g_ascii_strcasecmp (header_name, entry_contents) == 0) {
gtk_widget_set_sensitive (GTK_WIDGET (prefs->add_header), FALSE);
+ g_free (header_name);
return;
}
+ g_free (header_name);
+
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (prefs->header_list_store), &iter);
}
@@ -388,6 +391,8 @@ emmp_save_headers (EMMailerPrefs *prefs)
gboolean enabled;
gchar *xml;
+ h.name = NULL;
+
gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
HEADER_LIST_HEADER_COLUMN, &h.name,
HEADER_LIST_ENABLED_COLUMN, &enabled,
@@ -397,6 +402,8 @@ emmp_save_headers (EMMailerPrefs *prefs)
if ((xml = e_mail_reader_header_to_xml (&h)))
header_list = g_slist_append (header_list, xml);
+ g_free (h.name);
+
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (prefs->header_list_store), &iter);
}