mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
fix newly introduced mem-leak in assert-module
This commit is contained in:
parent
22a8e9536a
commit
b660a9f553
@ -65,7 +65,7 @@ static PHP_INI_MH(OnChangeCallback)
|
||||
ASSERTLS_FETCH();
|
||||
|
||||
if (ASSERT(callback)) {
|
||||
zval_dtor(ASSERT(callback));
|
||||
zval_ptr_dtor(&ASSERT(callback));
|
||||
} else {
|
||||
MAKE_STD_ZVAL(ASSERT(callback));
|
||||
}
|
||||
@ -111,6 +111,15 @@ PHP_MINIT_FUNCTION(assert)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(assert)
|
||||
{
|
||||
ASSERTLS_FETCH();
|
||||
|
||||
if (ASSERT(callback)) {
|
||||
zval_ptr_dtor(&ASSERT(callback));
|
||||
}
|
||||
}
|
||||
|
||||
PHP_RSHUTDOWN_FUNCTION(assert)
|
||||
{
|
||||
ASSERTLS_FETCH();
|
||||
|
@ -822,6 +822,7 @@ PHP_MSHUTDOWN_FUNCTION(basic)
|
||||
PHP_MSHUTDOWN(regex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MSHUTDOWN(array)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
|
||||
#ifdef TRANS_SID
|
||||
PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user