Only do this in debug build

This commit is contained in:
Xinchen Hui 2015-02-21 22:44:51 +08:00
parent 865a719a3f
commit f25419f8e3
2 changed files with 7 additions and 1 deletions

View File

@ -63,7 +63,9 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
/* destruct the function also, then - we have allocated it in get_method */
zend_string_release(func->internal_function.function_name);
efree(func);
EX(func) = NULL;
#if ZEND_DEBUG
execute_data->func = NULL;
#endif
}
/* }}} */

View File

@ -934,7 +934,9 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
/* destruct the function also, then - we have allocated it in get_method */
efree_size(func, sizeof(zend_internal_function));
#if ZEND_DEBUG
execute_data->func = NULL;
#endif
}
/* }}} */
@ -1155,7 +1157,9 @@ ZEND_API void zend_std_callstatic_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{
/* destruct the function also, then - we have allocated it in get_method */
efree_size(func, sizeof(zend_internal_function));
#if ZEND_DEBUG
execute_data->func = NULL;
#endif
}
/* }}} */