That's the same as in the previous commit. In the TS mode the tsrm
cache pointer might be unavailable or point to a wrong thread, so
the exact globals passed should be freed.
static void executor_globals_dtor(zend_executor_globals *executor_globals) /* {{{ */
{
- zend_ini_shutdown();
+ zend_ini_shutdown(executor_globals->ini_directives);
if (&executor_globals->persistent_list != global_persistent_list) {
zend_destroy_rsrc_list(&executor_globals->persistent_list);
}
}
/* }}} */
-ZEND_API int zend_ini_shutdown(void) /* {{{ */
+ZEND_API int zend_ini_shutdown(HashTable *ini_directives) /* {{{ */
{
- zend_hash_destroy(EG(ini_directives));
- free(EG(ini_directives));
+ zend_hash_destroy(ini_directives);
+ free(ini_directives);
return SUCCESS;
}
/* }}} */
BEGIN_EXTERN_C()
ZEND_API int zend_ini_startup(void);
-ZEND_API int zend_ini_shutdown(void);
+ZEND_API int zend_ini_shutdown(HashTable *ini_directives);
ZEND_API int zend_ini_global_shutdown(void);
ZEND_API int zend_ini_deactivate(void);
static void basic_globals_dtor(php_basic_globals *basic_globals_p) /* {{{ */
{
- if (BG(url_adapt_state_ex).tags) {
- zend_hash_destroy(BG(url_adapt_state_ex).tags);
- free(BG(url_adapt_state_ex).tags);
+ if (basic_globals_p->url_adapt_state_ex.tags) {
+ zend_hash_destroy(basic_globals_p->url_adapt_state_ex.tags);
+ free(basic_globals_p->url_adapt_state_ex.tags);
}
}
/* }}} */