summaryrefslogtreecommitdiffstats
path: root/libbb
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-15 04:28:48 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-15 04:28:48 (EST)
commitb6349400c742950c6d0f37b73a5b76605ee8dff4 (patch)
tree1a8a9a02d83194815e9917e5da6dfc59ce46abb5 /libbb
parentaf15a17a5a2476a4fd656d9e4bcdb1e134732962 (diff)
Free memory in error paths.
git-svn-id: http://opkg.googlecode.com/svn/trunk@308 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb')
-rw-r--r--libbb/unzip.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbb/unzip.c b/libbb/unzip.c
index 88d2a0a..058aa07 100644
--- a/libbb/unzip.c
+++ b/libbb/unzip.c
@@ -639,8 +639,11 @@ static int inflate_block(int *e)
}
/* decompress until an end-of-block code */
- if (inflate_codes(tl, td, bl, bd))
+ if (inflate_codes(tl, td, bl, bd)) {
+ huft_free(tl);
+ huft_free(td);
return 1;
+ }
/* free the decoding tables, return */
huft_free(tl);
@@ -816,8 +819,11 @@ static int inflate_block(int *e)
}
/* decompress until an end-of-block code */
- if (inflate_codes(tl, td, bl, bd))
+ if (inflate_codes(tl, td, bl, bd)) {
+ huft_free(tl);
+ huft_free(td);
return 1;
+ }
/* free the decoding tables, return */
huft_free(tl);