diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 399ab9b8c41..4cb907f9037 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -1394,6 +1394,7 @@ fperror: pass.centralfp = php_stream_fopen_tmpfile(); if (!pass.centralfp) { + php_stream_close(pass.filefp); goto fperror; }