]> granicus.if.org Git - php/commitdiff
close stream on failure
authorGreg Beaver <cellog@php.net>
Sat, 21 Jun 2008 06:55:56 +0000 (06:55 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 21 Jun 2008 06:55:56 +0000 (06:55 +0000)
ext/phar/phar.phar
ext/phar/phar_object.c

index 0da97c8923314eb690ccabeb998cbbc61769637e..124a1181fa1503cbb4e1cfb845ee7f6f460f1c68 100755 (executable)
Binary files a/ext/phar/phar.phar and b/ext/phar/phar.phar differ
index 41b30941f2a5a30bc04b73967260d415d271f2e9..1b8521393f66d297787a1d61a703f7bdb4287c4d 100755 (executable)
@@ -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);
        }
 
 }