mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix leaking the empty_string in TS builds
This commit is contained in:
parent
8d4ee9fbaa
commit
72b34e1372
2 changed files with 8 additions and 2 deletions
|
@ -477,7 +477,10 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS
|
|||
compiler_globals->last_static_member = 0;
|
||||
|
||||
#ifdef ZTS
|
||||
zend_string_release(compiler_globals->empty_string);
|
||||
if (NULL != compiler_globals->empty_string) {
|
||||
free(compiler_globals->empty_string);
|
||||
compiler_globals->empty_string = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -80,7 +80,10 @@ void zend_interned_strings_dtor(TSRMLS_D)
|
|||
#ifndef ZTS
|
||||
zend_hash_destroy(&CG(interned_strings));
|
||||
#else
|
||||
zend_string_release(CG(empty_string));
|
||||
if (NULL != CG(empty_string)) {
|
||||
free(CG(empty_string));
|
||||
CG(empty_string) = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue