diff options
author | Nikita Popov <nikic@php.net> | 2014-10-12 19:01:45 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-10-12 20:55:51 +0200 |
commit | c4ab08ac9d7a407f4b2ab43790cd0eae738615c6 (patch) | |
tree | dfa3d126476c35ca0113c3114481dea3007a45d9 /ext/reflection | |
parent | 471e71537f06ca4adef8c919f836956c8eb3422d (diff) | |
download | php-git-c4ab08ac9d7a407f4b2ab43790cd0eae738615c6.tar.gz |
Fix invalid zend_string_frees in reflection
zend_lookup_class can share the name
Diffstat (limited to 'ext/reflection')
-rw-r--r-- | ext/reflection/php_reflection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 7291d64213..57e11945c1 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2402,7 +2402,7 @@ ZEND_METHOD(reflection_parameter, getClass) } else { zend_string *name = zend_string_init(param->arg_info->class_name, param->arg_info->class_name_len, 0); ce = zend_lookup_class(name TSRMLS_CC); - zend_string_free(name); + zend_string_release(name); if (!ce) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s does not exist", param->arg_info->class_name); @@ -3862,10 +3862,10 @@ ZEND_METHOD(reflection_class, getProperty) if (!EG(exception)) { zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %s does not exist", classname->val); } - zend_string_free(classname); + zend_string_release(classname); return; } - zend_string_free(classname); + zend_string_release(classname); if (!instanceof_function(ce, ce2 TSRMLS_CC)) { zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Fully qualified property name %s::%s does not specify a base class of %s", ce2->name->val, str_name, ce->name->val); |