Skip to content

Commit 066c8ff

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: phar: Fix file descriptor/memory leak when opening central fp fails
2 parents 22bcea0 + 32a0d94 commit 066c8ff

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

13961396
if (!pass.centralfp) {
1397+
php_stream_close(pass.filefp);
13971398
goto fperror;
13981399
}
13991400

0 commit comments

Comments
 (0)