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

Fix leak of accel_globals->key

I don't know why this was guarded with ZTS, but it leaks on this test
(and a few more):
`./sapi/cli/php ./run-tests.php -c . --show-diff sapi/phpdbg/tests/stdin_001.phpt`

Closes GH-18593.
This commit is contained in:
Niels Dossche
2025-05-18 19:50:30 +02:00
parent 6b795f64a5
commit db3bf715e0
2 changed files with 1 additions and 2 deletions

1
NEWS
View File

@@ -43,6 +43,7 @@ PHP NEWS
failure). (nielsdos)
. Fixed bug GH-18534 (FPM exit code 70 with enabled opcache and hooked
properties in traits). (nielsdos)
. Fix leak of accel_globals->key. (nielsdos)
- SPL:
. Fixed bug GH-18421 (Integer overflow with large numbers in LimitIterator).

View File

@@ -2964,9 +2964,7 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
static void accel_globals_dtor(zend_accel_globals *accel_globals)
{
#ifdef ZTS
zend_string_free(accel_globals->key);
#endif
if (accel_globals->preloaded_internal_run_time_cache) {
pefree(accel_globals->preloaded_internal_run_time_cache, 1);
}