]> granicus.if.org Git - php/commitdiff
Fixed memory leak
authorDmitry Stogov <dmitry@zend.com>
Mon, 26 Oct 2020 22:20:22 +0000 (01:20 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 26 Oct 2020 22:20:22 +0000 (01:20 +0300)
ext/opcache/jit/zend_jit_trace.c

index 9452609b2c5d7c7c75d4d71983c4e1d10a66fbb9..5fc4c66e494872e5e114ef76b5c539c8a23c2657 100644 (file)
@@ -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);
                        }