diff --git a/ext/phar/zip.c b/ext/phar/zip.c index dff170dc29b48..f290e0ff16f69 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -1437,6 +1437,7 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, zend_long len, int pass.centralfp = php_stream_fopen_tmpfile(); if (!pass.centralfp) { + php_stream_close(pass.filefp); goto fperror; }