com php-src: Fixed reference-countingin ZTS build.: Zend/zend_inheritance.c

From: Date: Mon, 03 Sep 2018 07:20:40 +0000
Subject: com php-src: Fixed reference-countingin ZTS build.: Zend/zend_inheritance.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102962@lists.php.net to get a copy of this message
Commit: 7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b Author: Dmitry Stogov <dmitry@zend.com> Mon, 3 Sep 2018 10:20:40 +0300 Parents: 2677d438502b68a967d46ffadfadc138070ce762 Branches: PHP-7.1 PHP-7.2 PHP-7.3 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b Log: Fixed reference-countingin ZTS build. Changed paths: M Zend/zend_inheritance.c Diff: diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index b0c1f0a..4e7a6b9 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)); }

« previous php.cvs (#102962) next »