Commit: 1f5327a6022fedc1985d2daa6d189313d808b08b Author: Xinchen Hui <larue...@php.net> Fri, 1 Jun 2012 14:55:14 +0800 Parents: fa05f038cb2cd9e9fa17efd2286c42dcb3e9aa05 Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1f5327a6022fedc1985d2daa6d189313d808b08b Log: Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant) Bugs: https://bugs.php.net/62202 Changed paths: M NEWS M ext/reflection/php_reflection.c Diff: diff --git a/NEWS b/NEWS index 0297393..d031c3c 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,10 @@ PHP NEWS pattern). (Gustavo) . Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo) +- Reflection: + . Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks + with constant). (Laruence) + - XML Writer: . Fixed bug #62064 (memory leak in the XML Writer module). (jean-pierre dot lozi at lip6 dot fr) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 8141275..ca90269 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2420,7 +2420,8 @@ ZEND_METHOD(reflection_parameter, getDefaultValue) *return_value = precv->op2.u.constant; INIT_PZVAL(return_value); - if (Z_TYPE_P(return_value) != IS_CONSTANT && Z_TYPE_P(return_value) != IS_CONSTANT_ARRAY) { + if ((Z_TYPE_P(return_value) & IS_CONSTANT_TYPE_MASK) != IS_CONSTANT + && (Z_TYPE_P(return_value) & IS_CONSTANT_TYPE_MASK) != IS_CONSTANT_ARRAY) { zval_copy_ctor(return_value); } zval_update_constant_ex(&return_value, (void*)0, param->fptr->common.scope TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php