summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/zip/php_zip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 03c13ddc78..b7591b81d2 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -490,7 +490,9 @@ static void php_zip_object_free_storage(void *object TSRMLS_DC) /* {{{ */
return;
}
if (intern->za) {
- zip_close(intern->za);
+ if (zip_close(intern->za) != 0) {
+ _zip_free(intern->za);
+ }
intern->za = NULL;
}