Skip to content

Commit 898312a

Browse files
committed
Prevent double free
1 parent 0cc944f commit 898312a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/zend_closures.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ static void zend_closure_free_storage(zend_object *object) /* {{{ */
478478
/* We don't own the static variables of fake closures. */
479479
if (!(closure->func.op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
480480
zend_destroy_static_vars(&closure->func.op_array);
481+
closure->func.op_array.static_variables = NULL;
481482
}
482483
destroy_op_array(&closure->func.op_array);
483484
} else if (closure->orig_internal_handler == zend_closure_call_magic) {

0 commit comments

Comments
 (0)