]> granicus.if.org Git - php/commitdiff
fix leak in the object destrucotr when zip_close() fails (fixes oo_delete.phpt)
authorNuno Lopes <nlopess@php.net>
Sun, 12 Nov 2006 00:31:03 +0000 (00:31 +0000)
committerNuno Lopes <nlopess@php.net>
Sun, 12 Nov 2006 00:31:03 +0000 (00:31 +0000)
ext/zip/php_zip.c

index 03c13ddc782383af51905e2e21eed50e7a333329..b7591b81d2ed2599b17b289c5a34ef412bbf46b8 100644 (file)
@@ -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;
        }