projects
/
oweals
/
opkg-lede.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Free memory in error paths.
[oweals/opkg-lede.git]
/
libbb
/
unzip.c
diff --git
a/libbb/unzip.c
b/libbb/unzip.c
index 88d2a0aed8dc663d738047698e4b95c8bd2e6331..058aa07535539719180b3c3b28b1394f4116a25f 100644
(file)
--- 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 */
}
/* 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;
return 1;
+ }
/* free the decoding tables, return */
huft_free(tl);
/* 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 */
}
/* 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;
return 1;
+ }
/* free the decoding tables, return */
huft_free(tl);
/* free the decoding tables, return */
huft_free(tl);