summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorGlenn L McGrath2001-07-11 07:25:01 +0000
committerGlenn L McGrath2001-07-11 07:25:01 +0000
commit93febe672a943ed1cb4391fa451c3721e1498335 (patch)
tree241ea6e4e8a752cb32bfbb18628ec7aff349e486 /archival
parentc59fa37d4083861a5766da71e4d905565479f7a2 (diff)
downloadbusybox-93febe672a943ed1cb4391fa451c3721e1498335.zip
busybox-93febe672a943ed1cb4391fa451c3721e1498335.tar.gz
free coniditionally, just to make it play nice with dmalloc which is incompatable with standard free()
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/decompress_unzip.c8
-rw-r--r--archival/libunarchive/unzip.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index b85eb99..23bf6c7 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -1024,6 +1024,10 @@ extern void gz_close(int gunzip_pid)
if (waitpid(gunzip_pid, NULL, 0) == -1) {
printf("Couldnt wait ?");
}
- free(window);
- free(crc_table);
+ if (window) {
+ free(window);
+ }
+ if (crc_table) {
+ free(crc_table);
+ }
}
diff --git a/archival/libunarchive/unzip.c b/archival/libunarchive/unzip.c
index b85eb99..23bf6c7 100644
--- a/archival/libunarchive/unzip.c
+++ b/archival/libunarchive/unzip.c
@@ -1024,6 +1024,10 @@ extern void gz_close(int gunzip_pid)
if (waitpid(gunzip_pid, NULL, 0) == -1) {
printf("Couldnt wait ?");
}
- free(window);
- free(crc_table);
+ if (window) {
+ free(window);
+ }
+ if (crc_table) {
+ free(crc_table);
+ }
}