Skip to content

Commit a57ec0a

Browse files
committed
Merge branch 'PHP-7.3'
* PHP-7.3: Fixed reference-countingin ZTS build.
2 parents ef999f0 + bc731f8 commit a57ec0a

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
@@ -1322,12 +1322,12 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
13221322
}
13231323
}
13241324

1325+
function_add_ref(fn);
13251326
if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) {
13261327
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function));
13271328
memcpy(new_fn, fn, sizeof(zend_internal_function));
13281329
new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;
13291330
} else {
1330-
function_add_ref(fn);
13311331
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
13321332
memcpy(new_fn, fn, sizeof(zend_op_array));
13331333
}

0 commit comments

Comments
 (0)