From 2a6f992e9b24b1546ecf56c3f7b889ab59ff52d3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 18 May 2025 19:50:30 +0200 Subject: [PATCH] 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` --- ext/opcache/ZendAccelerator.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 459449d85f23c..a703c9551f9f0 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -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); }