Skip to content

Commit b3a15ec

Browse files
committed
Fix FREE emission for consts
1 parent 2bfa47e commit b3a15ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6216,7 +6216,7 @@ static void zend_compile_is(znode *result, zend_ast *ast)
62166216
ZVAL_COPY(&pattern_node.u.constant, &pattern_zv);
62176217

62186218
zend_emit_op_tmp(result, ZEND_IS, &expr_node, &pattern_node);
6219-
if (expr_node.op_type != IS_CV) {
6219+
if (expr_node.op_type & (IS_VAR|IS_TMP_VAR)) {
62206220
// FIXME: Verify live ranges recognizes that OP1 needs to be freed if an exception occurs
62216221
zend_emit_op(NULL, ZEND_FREE, &expr_node, NULL);
62226222
}

0 commit comments

Comments
 (0)