summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-09-03 10:20:40 +0300
committerDmitry Stogov <dmitry@zend.com>2018-09-03 10:20:40 +0300
commit7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b (patch)
tree82b4e4c3eb73668e5bb46cfd410f47da41ba84c9
parent2677d438502b68a967d46ffadfadc138070ce762 (diff)
downloadphp-git-7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b.tar.gz
Fixed reference-countingin ZTS build.
-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 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));
}