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:
1
NEWS
1
NEWS
@@ -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)
|
||||
|
||||
@@ -1417,6 +1417,7 @@ fperror:
|
||||
pass.centralfp = php_stream_fopen_tmpfile();
|
||||
|
||||
if (!pass.centralfp) {
|
||||
php_stream_close(pass.filefp);
|
||||
goto fperror;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user