com php-src: Fix invalid zend_string_frees in reflectio n: ext/reflection/php_reflection.c

From: Date: Sun, 12 Oct 2014 18:55:51 +0000
Subject: com php-src: Fix invalid zend_string_frees in reflectio n: ext/reflection/php_reflection.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82258@lists.php.net to get a copy of this message
Commit: c4ab08ac9d7a407f4b2ab43790cd0eae738615c6 Author: Nikita Popov <nikic@php.net> Sun, 12 Oct 2014 19:01:45 +0200 Parents: 471e71537f06ca4adef8c919f836956c8eb3422d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c4ab08ac9d7a407f4b2ab43790cd0eae738615c6 Log: Fix invalid zend_string_frees in reflection zend_lookup_class can share the name Changed paths: M ext/reflection/php_reflection.c Diff: diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 7291d64..57e1194 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);

« previous php.cvs (#82258) next »