fix newly introduced mem-leak in assert-module

This commit is contained in:
Thies C. Arntzen 2001-07-23 16:13:34 +00:00
parent 22a8e9536a
commit b660a9f553
2 changed files with 11 additions and 1 deletions

View File

@ -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();

View File

@ -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