From: Dmitry Stogov Date: Tue, 17 Dec 2019 07:09:22 +0000 (+0300) Subject: Fixed memory leak X-Git-Tag: php-7.4.7RC1~421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abf05181b9d3242805060354e63fb55d42562768;p=php Fixed memory leak --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 3e05d6d022..4511368bea 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3779,7 +3779,9 @@ ZEND_API int zend_declare_typed_property(zend_class_entry *ce, zend_string *name } /* Must be interned to avoid ZTS data races */ - name = zend_new_interned_string(zend_string_copy(name)); + if (is_persistent_class(ce)) { + name = zend_new_interned_string(zend_string_copy(name)); + } } if (access_type & ZEND_ACC_PUBLIC) {