lib/inflate: fix memory leak in inflate_fixed() on inflate_codes() failure
PATCH 1/1 lib/inflate: fix memory leak in inflate_fixed() on inflate_codes() failure
When inflate_codes() fails in inflate_fixed(), only the length list 'l' is freed, but the Huffman tables 'tl' and 'td' are leaked. Add the missing huft_free() calls on the error path.
Signed-off-by Josh Law <[email protected]>
--- lib/inflate.c | 2 ++ 1 file changed, 2 insertions(+)
lib/inflate.c +2 -0
@@ -811,6 +811,8 @@ DEBG("<fix");/* decompress until an end-of-block code */ if (inflate_codes (tl, td, bl, bd)) { +huft_free (tl); +huft_free (td);free (l);return 1 ; }
Signature · 1 line
2.43.0