Commit fc6aaf78ce9 for php.net
commit fc6aaf78ce9c5193f159daac8e43c9af9add3634
Author: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Date: Thu Jul 2 14:13:48 2026 -0700
Reflection: improve string release in `reflection_property_factory_str()`
Use `zend_string_release_ex()` rather than the generic `zend_string_release()`
since we know that the string is not marked as persistent (based on the `false`
parameter to `zend_string_init()` two lines earlier).
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 4a8db77347e..54f420b3cb0 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1574,7 +1574,7 @@ static void reflection_property_factory_str(zend_class_entry *ce, const char *na
{
zend_string *name = zend_string_init(name_str, name_len, false);
reflection_property_factory(ce, name, prop, object);
- zend_string_release(name);
+ zend_string_release_ex(name, false);
}
/* {{{ reflection_class_constant_factory */