summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-09-03 10:21:42 +0300
committerDmitry Stogov <dmitry@zend.com>2018-09-03 10:21:42 +0300
commitbc731f8e7a2b11edb35ebd85248c362d88511e12 (patch)
tree99808406b9f966ddddac69235511795a6fe8d311 /Zend/zend_inheritance.c
parent217888ed26dbd9f53bbca1206e621facfb7f7a0e (diff)
parentaccf5ed621eea200551b9030d69cf7926560340b (diff)
downloadphp-git-bc731f8e7a2b11edb35ebd85248c362d88511e12.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed reference-countingin ZTS build.
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index cca744a3c7..87e1297a7e 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -1250,12 +1250,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));
}