1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

phar: Fix file descriptor/memory leak when opening central fp fails

Closes GH-20145.
This commit is contained in:
Niels Dossche
2025-10-12 12:57:49 +02:00
parent 8a21d62c28
commit c89f25bf69
2 changed files with 2 additions and 0 deletions

1
NEWS
View File

@@ -23,6 +23,7 @@ PHP NEWS
. Fix memory leak of argument in webPhar. (nielsdos)
. Fix memory leak when setAlias() fails. (nielsdos)
. Fix memory leak in phar_parse_zipfile() error handling. (nielsdos)
. Fix file descriptor/memory leak when opening central fp fails. (nielsdos)
- Random:
. Fix Randomizer::__serialize() w.r.t. INDIRECTs. (nielsdos)

View File

@@ -1417,6 +1417,7 @@ fperror:
pass.centralfp = php_stream_fopen_tmpfile();
if (!pass.centralfp) {
php_stream_close(pass.filefp);
goto fperror;
}