Skip to content

Commit db3bf71

Browse files
committed
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.
1 parent 6b795f6 commit db3bf71

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PHP NEWS
4343
failure). (nielsdos)
4444
. Fixed bug GH-18534 (FPM exit code 70 with enabled opcache and hooked
4545
properties in traits). (nielsdos)
46+
. Fix leak of accel_globals->key. (nielsdos)
4647

4748
- SPL:
4849
. Fixed bug GH-18421 (Integer overflow with large numbers in LimitIterator).

ext/opcache/ZendAccelerator.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2964,9 +2964,7 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
29642964

29652965
static void accel_globals_dtor(zend_accel_globals *accel_globals)
29662966
{
2967-
#ifdef ZTS
29682967
zend_string_free(accel_globals->key);
2969-
#endif
29702968
if (accel_globals->preloaded_internal_run_time_cache) {
29712969
pefree(accel_globals->preloaded_internal_run_time_cache, 1);
29722970
}

0 commit comments

Comments
 (0)