memory leak in inflate.c
Vijay.Singh at nokia.com
Vijay.Singh at nokia.com
Mon Mar 14 11:37:57 PST 2005
Hi, I am trying to debug a memory leak in executing gzipped binaries when the parameter list is too long. The function in question is inflate_dynamic().
/* decompress until an end-of-block code */
if (inflate_codes(glbl, tl, td, bl, bd))
return 1;
/* free the decoding tables, return */
huft_free(glbl, tl);
huft_free(glbl, td);
return 0;
Should this be re-written as:
i = inflate_codes(glbl, tl, td, bl, bd) ? 1 : 0;
/* free the decoding tables, return */
huft_free(glbl, tl);
huft_free(glbl, td);
return (i);
so that the Huffman tables are always freed.
Comments appreciated.
br
vijay
More information about the freebsd-hackers
mailing list