Skip to content

Commit 165bbb9

Browse files
committed
Avoid freeing newthis
It will be freed by zend_vm_stack_free_args() automatically.
1 parent 13b2dc9 commit 165bbb9

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Zend/zend_closures.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ static bool zend_valid_closure_binding(
8686
zend_error(E_WARNING, "Cannot bind an instance to a static closure, this will be an error in PHP 9");
8787
return false;
8888
} else {
89-
zend_object *obj = Z_OBJ_P(newthis);
90-
ZVAL_UNDEF(newthis);
91-
GC_DTOR(obj);
9289
*newthis_ptr = NULL;
9390
}
9491
}

0 commit comments

Comments
 (0)