From a17cec446a0f8433ac1f4c71db9b733bd089b2b2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 27 Oct 2020 01:20:22 +0300 Subject: [PATCH] Fixed memory leak --- ext/opcache/jit/zend_jit_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 9452609b2c..5fc4c66e49 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5743,9 +5743,9 @@ done: && (init_opline->opcode != ZEND_INIT_METHOD_CALL || init_opline->op1_type == IS_UNDEF) && (init_opline->opcode != ZEND_INIT_USER_CALL - || init_opline->op2_type == IS_CONST) /* no closure */ + || (p->func && (!p->func->common.scope || (p->func->common.fn_flags & ZEND_ACC_STATIC)))) && (init_opline->opcode != ZEND_INIT_DYNAMIC_CALL - || init_opline->op2_type == IS_CONST) /* no closure */ + || (p->func && (!p->func->common.scope || (p->func->common.fn_flags & ZEND_ACC_STATIC)))) ) { TRACE_FRAME_SET_NO_NEED_RELEASE_THIS(call); } -- 2.40.0