Re: [PATCH 1/1] lib/message-file.c: use g_malloc () & g_free () in hash table values

Subject: Re: [PATCH 1/1] lib/message-file.c: use g_malloc () & g_free () in hash table values

Date: Sat, 22 Dec 2012 09:21:40 -0400

To: Tomi Ollila, notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: David Bremner


Tomi Ollila <tomi.ollila@iki.fi> writes:

> @@ -111,7 +111,7 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename)
>      message->headers = g_hash_table_new_full (strcase_hash,
>  					      strcase_equal,
>  					      free,
> -					      free);
> +					      g_free);

It slightly icky that the keys in this hash table are allocated/freed
with (x)malloc/(x)free, and the values with g_malloc/g_free, but that's
not your fault, and it's an improvement on what we had before, so +1
from me.

d



Thread: