summaryrefslogtreecommitdiff
path: root/thirdparty/minizip/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/minizip/unzip.c')
-rw-r--r--thirdparty/minizip/unzip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/thirdparty/minizip/unzip.c b/thirdparty/minizip/unzip.c
index 3b191e827c..e83aff2773 100644
--- a/thirdparty/minizip/unzip.c
+++ b/thirdparty/minizip/unzip.c
@@ -112,7 +112,7 @@
# define ALLOC(size) (malloc(size))
#endif
#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
+# define TRYFREE(p) { free(p);}
#endif
#define SIZECENTRALDIRITEM (0x2e)
@@ -1595,6 +1595,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;
else
{
+ TRYFREE(pfile_in_zip_read_info->read_buffer);
TRYFREE(pfile_in_zip_read_info);
return err;
}
@@ -1617,6 +1618,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;
else
{
+ TRYFREE(pfile_in_zip_read_info->read_buffer);
TRYFREE(pfile_in_zip_read_info);
return err;
}