From e4842dc1b18a24d2e268f0e40d1329f6cb739753 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 23 Feb 2000 21:04:30 +0000 Subject: Free the data in the headers hash table. (_add_header): g_strdup the * camel-medium.c (_finalize): Free the data in the headers hash table. (_add_header): g_strdup the header name and value when adding it. * camel-mime-part-utils.c (camel_mime_part_construct_headers_from_stream): Free the header data after calling camel_medium_add_header, since it will have g_strdup()ed it itself. svn path=/trunk/; revision=1913 --- camel/camel-mime-part-utils.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'camel/camel-mime-part-utils.c') diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index 6a06bc3bce..fe3c175cb3 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -65,12 +65,13 @@ camel_mime_part_construct_headers_from_stream (CamelMimePart *mime_part, camel_medium_add_header ( CAMEL_MEDIUM (mime_part), cur_header->name, cur_header->value); - } + g_free (cur_header->name); + g_free (cur_header->value); + } - g_array_free (header_array, TRUE); + g_array_free (header_array, TRUE); - CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_headers_from_stream " - "headers parsed. Leaving \n"); + CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_headers_from_stream headers parsed. Leaving\n"); } } -- cgit v1.2.3