Skip to content

Commit 32a0d94

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: phar: Fix file descriptor/memory leak when opening central fp fails
2 parents 1adf63d + f84605b commit 32a0d94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/phar/zip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,7 @@ void phar_zip_flush(phar_archive_data *phar, zend_string *user_stub, bool is_def
14011401
pass.centralfp = php_stream_fopen_tmpfile();
14021402

14031403
if (!pass.centralfp) {
1404+
php_stream_close(pass.filefp);
14041405
goto fperror;
14051406
}
14061407

0 commit comments

Comments
 (0)