From: Xinchen Hui Date: Tue, 7 Jul 2015 10:19:57 +0000 (+0800) Subject: Fixed use after free on closure_call_leak_with_exception.phpt X-Git-Tag: php-7.0.0beta1~12^2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=333528089e053b1db35a073955b3ec7244881667;p=php Fixed use after free on closure_call_leak_with_exception.phpt --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 6122566b3e..3bd1917539 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2488,8 +2488,7 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data } if (call->func->common.fn_flags & ZEND_ACC_CLOSURE) { zend_object_release((zend_object *) call->func->common.prototype); - } - if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { + } else if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { zend_string_release(call->func->common.function_name); zend_free_trampoline(call->func); }