summaryrefslogtreecommitdiff
path: root/ext/reflection
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-06-01 14:55:14 +0800
committerXinchen Hui <laruence@php.net>2012-06-01 14:57:27 +0800
commit1f5327a6022fedc1985d2daa6d189313d808b08b (patch)
treea065a87b85f2a257a131f856eb08a70b7bad01c5 /ext/reflection
parentfa05f038cb2cd9e9fa17efd2286c42dcb3e9aa05 (diff)
downloadphp-git-1f5327a6022fedc1985d2daa6d189313d808b08b.tar.gz
Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
Diffstat (limited to 'ext/reflection')
-rw-r--r--ext/reflection/php_reflection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 8141275e7b..ca90269fcd 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);