aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-09-22 04:36:48 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-09-22 04:36:48 +0800
commit4713393d8b19b2a2eca586389f8cc7c963a42156 (patch)
treea3180614937ef38c1773c05add8db96052fe0d33 /mail/mail-format.c
parent8fb132dab0e8291ed8ac2017a329c23148cc5f1a (diff)
downloadgsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.tar
gsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.tar.gz
gsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.tar.bz2
gsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.tar.lz
gsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.tar.xz
gsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.tar.zst
gsoc2013-evolution-4713393d8b19b2a2eca586389f8cc7c963a42156.zip
Fixed some memory leakage. Call free_recipients() so we don't leak memory.
2000-09-21 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_generate_reply): Fixed some memory leakage. Call free_recipients() so we don't leak memory. svn path=/trunk/; revision=5542
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 93ad41fbcb..8232f20d9e 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1604,6 +1604,16 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean *is
return text;
}
+static void
+free_recipients (GList *list)
+{
+ GList *l;
+
+ for (l = list; l; l = l->next)
+ g_free (l->data);
+ g_list_free (list);
+}
+
EMsgComposer *
mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
{
@@ -1714,7 +1724,7 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
fulladdr = g_strdup_printf ("\"%s\" <%s>", name, addr);
} else
fulladdr = g_strdup (addr);
-
+
if (strcmp (addr, id->address) != 0)
cc = g_list_append (cc, fulladdr);
}
@@ -1733,8 +1743,8 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
}
e_msg_composer_set_headers (composer, to, cc, NULL, subject);
- g_list_free (to);
- g_list_free (cc);
+ free_recipients (to);
+ free_recipients (cc);
g_free (subject);
/* Add In-Reply-To and References. */