From 7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 3 Sep 2018 10:20:40 +0300 Subject: Fixed reference-countingin ZTS build. --- Zend/zend_inheritance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index b0c1f0ac37..4e7a6b925f 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1224,12 +1224,12 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s } } + function_add_ref(fn); if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) { new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function)); memcpy(new_fn, fn, sizeof(zend_internal_function)); new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED; } else { - function_add_ref(fn); new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array)); memcpy(new_fn, fn, sizeof(zend_op_array)); } -- cgit v1.2.1