mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Backport accel_globals->key leak fix (8.3)
Closes GH-18602.
This commit is contained in:
1
NEWS
1
NEWS
@@ -34,6 +34,7 @@ PHP NEWS
|
||||
memory_consumption or jit_buffer_size). (nielsdos)
|
||||
. Fixed bug GH-18567 (Preloading with internal class alias triggers assertion
|
||||
failure). (nielsdos)
|
||||
. Fix leak of accel_globals->key. (nielsdos)
|
||||
|
||||
- PDO_OCI:
|
||||
. Fixed bug GH-18494 (PDO OCI segfault in statement GC). (nielsdos)
|
||||
|
||||
@@ -2937,12 +2937,10 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
|
||||
GC_MAKE_PERSISTENT_LOCAL(accel_globals->key);
|
||||
}
|
||||
|
||||
#ifdef ZTS
|
||||
static void accel_globals_dtor(zend_accel_globals *accel_globals)
|
||||
{
|
||||
zend_string_free(accel_globals->key);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_HUGE_CODE_PAGES
|
||||
# ifndef _WIN32
|
||||
@@ -3384,6 +3382,8 @@ void accel_shutdown(void)
|
||||
if (!ZCG(enabled) || !accel_startup_ok) {
|
||||
#ifdef ZTS
|
||||
ts_free_id(accel_globals_id);
|
||||
#else
|
||||
accel_globals_dtor(&accel_globals);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -3398,6 +3398,8 @@ void accel_shutdown(void)
|
||||
|
||||
#ifdef ZTS
|
||||
ts_free_id(accel_globals_id);
|
||||
#else
|
||||
accel_globals_dtor(&accel_globals);
|
||||
#endif
|
||||
|
||||
if (!_file_cache_only) {
|
||||
|
||||
Reference in New Issue
Block a user