aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/libunarchive/decompress_unzip.c8
-rw-r--r--archival/libunarchive/unzip.c8
-rw-r--r--libbb/unzip.c8
3 files changed, 18 insertions, 6 deletions
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index b85eb9981..23bf6c73c 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -1024,6 +1024,10 @@ extern void gz_close(int gunzip_pid)
1024 if (waitpid(gunzip_pid, NULL, 0) == -1) { 1024 if (waitpid(gunzip_pid, NULL, 0) == -1) {
1025 printf("Couldnt wait ?"); 1025 printf("Couldnt wait ?");
1026 } 1026 }
1027 free(window); 1027 if (window) {
1028 free(crc_table); 1028 free(window);
1029 }
1030 if (crc_table) {
1031 free(crc_table);
1032 }
1029} 1033}
diff --git a/archival/libunarchive/unzip.c b/archival/libunarchive/unzip.c
index b85eb9981..23bf6c73c 100644
--- a/archival/libunarchive/unzip.c
+++ b/archival/libunarchive/unzip.c
@@ -1024,6 +1024,10 @@ extern void gz_close(int gunzip_pid)
1024 if (waitpid(gunzip_pid, NULL, 0) == -1) { 1024 if (waitpid(gunzip_pid, NULL, 0) == -1) {
1025 printf("Couldnt wait ?"); 1025 printf("Couldnt wait ?");
1026 } 1026 }
1027 free(window); 1027 if (window) {
1028 free(crc_table); 1028 free(window);
1029 }
1030 if (crc_table) {
1031 free(crc_table);
1032 }
1029} 1033}
diff --git a/libbb/unzip.c b/libbb/unzip.c
index b85eb9981..23bf6c73c 100644
--- a/libbb/unzip.c
+++ b/libbb/unzip.c
@@ -1024,6 +1024,10 @@ extern void gz_close(int gunzip_pid)
1024 if (waitpid(gunzip_pid, NULL, 0) == -1) { 1024 if (waitpid(gunzip_pid, NULL, 0) == -1) {
1025 printf("Couldnt wait ?"); 1025 printf("Couldnt wait ?");
1026 } 1026 }
1027 free(window); 1027 if (window) {
1028 free(crc_table); 1028 free(window);
1029 }
1030 if (crc_table) {
1031 free(crc_table);
1032 }
1029} 1033}