From: Carl Worth Date: Tue, 20 Oct 2009 19:48:14 +0000 (-0700) Subject: message.c: Free leaked memory in notmuch_message object X-Git-Tag: 0.1~815 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25aef828771a95f0c968acd33266019019716a41;p=notmuch.git message.c: Free leaked memory in notmuch_message object We were careful to free this memory when we finished parsing the headers, but we missed it for the case of closing the message without ever parsing all of the headers. --- diff --git a/message.c b/message.c index bd551ccd..e6488a37 100644 --- a/message.c +++ b/message.c @@ -104,6 +104,12 @@ notmuch_message_close (notmuch_message_t *message) if (message == NULL) return; + if (message->line) + free (message->line); + + if (message->value.size) + free (message->value.str); + if (message->headers) g_hash_table_unref (message->headers);