Skip to content

Commit f84605b

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: phar: Fix file descriptor/memory leak when opening central fp fails
2 parents a1c290f + c89f25b commit f84605b

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
@@ -1402,6 +1402,7 @@ void phar_zip_flush(phar_archive_data *phar, zend_string *user_stub, bool is_def
14021402
pass.centralfp = php_stream_fopen_tmpfile();
14031403

14041404
if (!pass.centralfp) {
1405+
php_stream_close(pass.filefp);
14051406
goto fperror;
14061407
}
14071408

0 commit comments

Comments
 (0)