Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Mar 2005 11:36:21 -0800
From:      <Vijay.Singh@nokia.com>
To:        <freebsd-hackers@freebsd.org>
Subject:   memory leak in inflate.c
Message-ID:  <E40595640FD457418D8F9005C2BEC8496456D0@mvebe001.americas.nokia.com>

next in thread | raw e-mail | index | archive | help
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().=20

        /* 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 =3D inflate_codes(glbl, tl, td, bl, bd) ? 1 : 0;
       =20
        	/* 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
=09



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E40595640FD457418D8F9005C2BEC8496456D0>