summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-31 15:10:09 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-31 15:10:09 +0200
commit1f6f9c70cb4e82ca9fbbf3153173e3d73a0f9170 (patch)
treed04b709216fa32168cbc5a9d53b321e0e7004e41 /ext/reflection/php_reflection.c
parent8bb2f406def958671e7719966a4c015dfe1e448b (diff)
downloadphp-git-1f6f9c70cb4e82ca9fbbf3153173e3d73a0f9170.tar.gz
Fix leak on consteval exception in ReflectionClass::__toString()
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index df00e5b4ba..620d95afa4 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -373,6 +373,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
_class_const_string(str, ZSTR_VAL(key), c, ZSTR_VAL(sub_indent));
if (UNEXPECTED(EG(exception))) {
+ zend_string_release(sub_indent);
return;
}
} ZEND_HASH_FOREACH_END();