summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index b9f0bb73ac..cfac566506 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -238,17 +238,17 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil
return 0;
}
- stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
-
- if (stream == NULL) {
+ zf = zip_fopen(za, file, 0);
+ if (zf == NULL) {
n = -1;
goto done;
}
- zf = zip_fopen(za, file, 0);
- if (zf == NULL) {
+ stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
+
+ if (stream == NULL) {
n = -1;
- php_stream_close(stream);
+ zip_fclose(zf);
goto done;
}