Skip to content

Commit abf0518

Browse files
committed
Fixed memory leak
1 parent 0927af3 commit abf0518

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_API.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3779,7 +3779,9 @@ ZEND_API int zend_declare_typed_property(zend_class_entry *ce, zend_string *name
37793779
}
37803780

37813781
/* Must be interned to avoid ZTS data races */
3782-
name = zend_new_interned_string(zend_string_copy(name));
3782+
if (is_persistent_class(ce)) {
3783+
name = zend_new_interned_string(zend_string_copy(name));
3784+
}
37833785
}
37843786

37853787
if (access_type & ZEND_ACC_PUBLIC) {

0 commit comments

Comments
 (0)