From: Nuno Lopes Date: Sun, 12 Nov 2006 00:31:37 +0000 (+0000) Subject: MFB: fix leak in the object destrucotr when zip_close() fails (fixes oo_delete.phpt) X-Git-Tag: RELEASE_1_0_0RC1~1051 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d21a598f61ed60a7276ac8878c7b2f5f6368cf34;p=php MFB: fix leak in the object destrucotr when zip_close() fails (fixes oo_delete.phpt) --- diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 89f465b671..66ca28b432 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -470,7 +470,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; }