Patch: tny_camel_mime_part_get_header_pairs leaks all the created header pairs
- From: José Dapena Paz <jdapena igalia com>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Patch: tny_camel_mime_part_get_header_pairs leaks all the created header pairs
- Date: Wed, 25 Jun 2008 12:17:44 +0200
Hi,
This very small and very trivial fix for a leak in
tny_camel_mime_part_get_header_pairs_default. We're leaking all the
pairs created there.
Changelog:
* libtinymail-camel/tny-camel-mime-part.c
(..._get_header_pairs_default): we were leaking all the TnyPair objects
created here. Fixed.
--
José Dapena Paz <jdapena igalia com>
Igalia
Index: libtinymail-camel/tny-camel-mime-part.c
===================================================================
--- libtinymail-camel/tny-camel-mime-part.c (revision 3705)
+++ libtinymail-camel/tny-camel-mime-part.c (working copy)
@@ -147,7 +147,9 @@
for (i=0; i < headers->len; i++)
{
CamelMediumHeader *header = &g_array_index (headers, CamelMediumHeader, i);
- tny_list_append (list, G_OBJECT (tny_pair_new (header->name, header->value)));
+ TnyPair *pair = tny_pair_new (header->name, header->value);
+ tny_list_append (list, G_OBJECT (pair));
+ g_object_unref (pair);
}
camel_medium_free_headers (CAMEL_MEDIUM (priv->part), headers);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]