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

Fix leak of accel_shared_globals for file_cache_only (GH-16517)

If `opcache.file_cache_only` is enabled, `accel_shared_globals` is
allocated as true global, and we need to free that memory when we shut
down the accelerator.
This commit is contained in:
Christoph M. Becker
2024-10-21 12:37:21 +02:00
committed by GitHub
parent c2459d8cc2
commit bd6ddcf21f

View File

@@ -3408,6 +3408,8 @@ void accel_shutdown(void)
/* Delay SHM detach */
orig_post_shutdown_cb = zend_post_shutdown_cb;
zend_post_shutdown_cb = accel_post_shutdown;
} else {
free(accel_shared_globals);
}
zend_compile_file = accelerator_orig_compile_file;