diff options
| author | Nuno Lopes <nlopess@php.net> | 2006-11-12 00:31:03 +0000 |
|---|---|---|
| committer | Nuno Lopes <nlopess@php.net> | 2006-11-12 00:31:03 +0000 |
| commit | c0b0d0a81a7d5c1ca150068179911473af2f0069 (patch) | |
| tree | 79ed52ab9fc31e4abc450a919df6cbfe5d78eb69 /ext/zip/php_zip.c | |
| parent | 232bb79bedd276d5a1510ad849e952a056a08c05 (diff) | |
| download | php-git-c0b0d0a81a7d5c1ca150068179911473af2f0069.tar.gz | |
fix leak in the object destrucotr when zip_close() fails (fixes oo_delete.phpt)
Diffstat (limited to 'ext/zip/php_zip.c')
| -rw-r--r-- | ext/zip/php_zip.c | 4 |
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; } |
