summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-31 15:10:34 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-31 15:10:53 +0200
commit53a87547c8545aa26330ae2ba306364a73d0b93d (patch)
treeff8845c19998ca31bc3996a8b04aa3d02779c63b /ext/reflection/php_reflection.c
parent1036fd2a70050a5955286e92852bbc560bb1fa78 (diff)
parent1f6f9c70cb4e82ca9fbbf3153173e3d73a0f9170 (diff)
downloadphp-git-53a87547c8545aa26330ae2ba306364a73d0b93d.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: 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 f5c2b0f63c..11b834503b 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -383,6 +383,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();