summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-09-03 10:21:32 +0300
committerDmitry Stogov <dmitry@zend.com>2018-09-03 10:21:32 +0300
commitaccf5ed621eea200551b9030d69cf7926560340b (patch)
tree832d3e8727994cff7fab98d539275784742ab01d
parentcd0a37994e3cbf1f0aa1174155d3d662cefe2e7a (diff)
parent7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b (diff)
downloadphp-git-accf5ed621eea200551b9030d69cf7926560340b.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: 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 2b41f109cd..2d51ed150e 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -1209,12 +1209,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));
}