com php-src: Fix refcounting of prop types coming from traits: Zend/zend_inheritance.c
| From: | Nikita Popov | Date: | Fri, 08 Feb 2019 11:20:31 +0000 |
| Subject: | com php-src: Fix refcounting of prop types coming from traits: Zend/zend_inheritance.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104483@lists.php.net to get a copy of this message | ||
Commit: 7a6fa7f6247d13d4d464a948451866b554721f81
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 8 Feb 2019 12:20:31 +0100
Parents: fa123b51ccd173224fb033ddcf148e8a97138127
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7a6fa7f6247d13d4d464a948451866b554721f81
Log:
Fix refcounting of prop types coming from traits
Changed paths:
M Zend/zend_inheritance.c
Diff:
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index acf0962..6a66846 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -1825,6 +1825,9 @@ static void zend_do_traits_property_binding(zend_class_entry *ce,
zend_class_ent
Z_TRY_ADDREF_P(prop_value);
doc_comment = property_info->doc_comment ? zend_string_copy(property_info->doc_comment) :
NULL;
+ if (ZEND_TYPE_IS_NAME(property_info->type)) {
+ zend_string_addref(ZEND_TYPE_NAME(property_info->type));
+ }
zend_declare_typed_property(ce, prop_name, prop_value, flags, doc_comment,
property_info->type);
zend_string_release_ex(prop_name, 0);
} ZEND_HASH_FOREACH_END();