Skip to content

Commit 5f6eaf3

Browse files
committed
Add missing refcount increment
1 parent f9895b4 commit 5f6eaf3

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
@@ -272,6 +272,7 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
272272
if (fcc.object && fcc.object->ce == zend_ce_closure
273273
&& zend_string_equals_literal(mptr->common.function_name, "__invoke")) {
274274
ZVAL_OBJ(return_value, fcc.object);
275+
GC_REFCOUNT(fcc.object)++;
275276
zend_free_trampoline(mptr);
276277
return SUCCESS;
277278
}

0 commit comments

Comments
 (0)