diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 5c541a3543a..b08dc65664e 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -1401,6 +1401,7 @@ fperror: pass.centralfp = php_stream_fopen_tmpfile(); if (!pass.centralfp) { + php_stream_close(pass.filefp); goto fperror; }