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.
This commit is contained in:
Carl Worth 2009-10-20 12:48:14 -07:00
parent 00b65cad98
commit 25aef82877

View file

@ -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);