On Thu, 4 Nov 2010 20:49:35 -0700, Michael Forney <[email protected]> wrote: > When decoded_value, header_sofar, and header are unused, they should > be freed.
Thanks for the cleanups here. Just looking over the patch it's clear
that I let some code into message-file.c without coercing the style into
what I would really prefer to see, (should use talloc more, should move
away from overly-abbreviated identifiers such as "hdrsofar", and
shouldn't have ambiguously named identifiers such as "header_sofar" and
"hdrsofar").
> + free(decoded_value);
> + free(header_sofar);
> g_hash_table_insert (message->headers, header, combined_header);
> }
> } else {
> if (header_sofar == NULL) {
> /* Only insert if we don't have a value for this header, yet. */
> g_hash_table_insert (message->headers, header, decoded_value);
> + } else {
> + free(header);
> + free(decoded_value);
But I didn't push the change yet. The above do look like memory leak
fixes as described in the commit message.
> if (match && !is_received)
> - return decoded_value;
> + return header_sofar == NULL ? decoded_value : header_sofar;
> }
But this part looks like an independent bug fix that needs its own
description, (and perhaps a test case?). Could you please split the
patch into two?
Thanks,
-Carl
--
[email protected]
pgpegQgPb7Hwj.pgp
Description: PGP signature
_______________________________________________ notmuch mailing list [email protected] http://notmuchmail.org/mailman/listinfo/notmuch
