summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libbb/unarchive.c2
-rw-r--r--libbb/unzip.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index 2457824..5fc5725 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -715,7 +715,7 @@ char *deb_extract(const char *package_filename, FILE *out_stream,
char *output_buffer = NULL;
char *ared_file = NULL;
char ar_magic[8];
- int gunzip_pid;
+ int gunzip_pid = 0;
if (filename != NULL) {
file_list = xmalloc(sizeof(char *) * 2);
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;
}