From: Greg Beaver Date: Sat, 21 Jun 2008 06:55:56 +0000 (+0000) Subject: close stream on failure X-Git-Tag: php-5.3.0alpha1~685 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=baee4e6028ee5e777a50ac37150a0d2f557f561b;p=php close stream on failure --- diff --git a/ext/phar/phar.phar b/ext/phar/phar.phar index 0da97c8923..124a1181fa 100755 Binary files a/ext/phar/phar.phar and b/ext/phar/phar.phar differ diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 41b30941f2..1b8521393f 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1736,6 +1736,8 @@ PHP_METHOD(Phar, buildFromDirectory) zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, error); efree(error); } + } else { + php_stream_close(pass.fp); } } @@ -1785,6 +1787,8 @@ PHP_METHOD(Phar, buildFromIterator) zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, error); efree(error); } + } else { + php_stream_close(pass.fp); } }