Skip to content

Commit 7fde224

Browse files
committed
Fixed reference-countingin ZTS build.
1 parent 2677d43 commit 7fde224

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,12 +1224,12 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
12241224
}
12251225
}
12261226

1227+
function_add_ref(fn);
12271228
if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) {
12281229
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function));
12291230
memcpy(new_fn, fn, sizeof(zend_internal_function));
12301231
new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;
12311232
} else {
1232-
function_add_ref(fn);
12331233
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
12341234
memcpy(new_fn, fn, sizeof(zend_op_array));
12351235
}

0 commit comments

Comments
 (0)