aboutsummaryrefslogtreecommitdiff
path: root/src/common/unzip.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-14 19:55:45 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-14 19:55:45 +0000
commitc44b9f73d7f8a474f640bb006df9b659554b42f7 (patch)
tree5626f7fe47707694bdab58a6cf832a4d0eef8106 /src/common/unzip.c
parent913ee123deea873b7f84129e426385d8c9c75f59 (diff)
downloadlibextractor-c44b9f73d7f8a474f640bb006df9b659554b42f7.tar.gz
libextractor-c44b9f73d7f8a474f640bb006df9b659554b42f7.zip
fix leak
Diffstat (limited to 'src/common/unzip.c')
-rw-r--r--src/common/unzip.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/unzip.c b/src/common/unzip.c
index 5c6c35f..b4215ac 100644
--- a/src/common/unzip.c
+++ b/src/common/unzip.c
@@ -1170,9 +1170,15 @@ EXTRACTOR_common_unzip_open_current_file3 (EXTRACTOR_unzip_file file,
1170 1170
1171 err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); 1171 err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
1172 if (err == Z_OK) 1172 if (err == Z_OK)
1173 pfile_in_zip_read_info->stream_initialised=1; 1173 {
1174 pfile_in_zip_read_info->stream_initialised=1;
1175 }
1174 else 1176 else
1175 return err; 1177 {
1178 free (pfile_in_zip_read_info->read_buffer);
1179 free (pfile_in_zip_read_info);
1180 return err;
1181 }
1176 /* windowBits is passed < 0 to tell that there is no zlib header. 1182 /* windowBits is passed < 0 to tell that there is no zlib header.
1177 * Note that in this case inflate *requires* an extra "dummy" byte 1183 * Note that in this case inflate *requires* an extra "dummy" byte
1178 * after the compressed stream in order to complete decompression and 1184 * after the compressed stream in order to complete decompression and