summaryrefslogtreecommitdiffstats
path: root/libbb/unzip.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:12:11 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:12:11 (EST)
commit163ff95e8dd49c4b51f8bca4d35617ae1a1fdb24 (patch)
treee29da27360b2a859ab25d368df5a0a9fdbc5a65f /libbb/unzip.c
parent5aa48e99d2a76525de7632327eda7e3f13138639 (diff)
opkg: fix some initialisation and double free issues in libbb
git-svn-id: http://opkg.googlecode.com/svn/trunk@85 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb/unzip.c')
-rw-r--r--libbb/unzip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libbb/unzip.c b/libbb/unzip.c
index 3826316..fb2429b 100644
--- a/libbb/unzip.c
+++ b/libbb/unzip.c
@@ -71,7 +71,7 @@ static FILE *in_file, *out_file;
/* these are freed by gz_close */
static unsigned char *window;
-static unsigned long *crc_table;
+static unsigned long *crc_table = NULL;
static unsigned long crc; /* shift register contents */
@@ -1020,6 +1020,9 @@ extern int unzip(FILE *l_in_file, FILE *l_out_file)
free(window);
free(crc_table);
+ window = NULL;
+ crc_table = NULL;
+
return exit_code;
}