diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-13 14:48:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-13 14:48:23 +0000 |
commit | da53ff715e5687bc08d995d836af5dcfcdc43164 (patch) | |
tree | 874423567e24ae9c81fa3e6ac286cac662eef028 | |
parent | 061e831ca730338c834ae05567a3422771a5d25e (diff) | |
download | libextractor-da53ff715e5687bc08d995d836af5dcfcdc43164.tar.gz libextractor-da53ff715e5687bc08d995d836af5dcfcdc43164.zip |
null check
-rw-r--r-- | src/common/unzip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/unzip.c b/src/common/unzip.c index 0795658..5c6c35f 100644 --- a/src/common/unzip.c +++ b/src/common/unzip.c | |||
@@ -661,6 +661,11 @@ EXTRACTOR_common_unzip_open2 (const char *path, | |||
661 | 661 | ||
662 | 662 | ||
663 | s=(unz_s*)ALLOC(sizeof(unz_s)); | 663 | s=(unz_s*)ALLOC(sizeof(unz_s)); |
664 | if (s == NULL) | ||
665 | { | ||
666 | ZCLOSE(us.z_filefunc, us.filestream); | ||
667 | return NULL; | ||
668 | } | ||
664 | *s=us; | 669 | *s=us; |
665 | EXTRACTOR_common_unzip_go_to_first_file((EXTRACTOR_unzip_file)s); | 670 | EXTRACTOR_common_unzip_go_to_first_file((EXTRACTOR_unzip_file)s); |
666 | return (EXTRACTOR_unzip_file)s; | 671 | return (EXTRACTOR_unzip_file)s; |