From: Kalle Sommer Nielsen Date: Wed, 1 Jul 2009 17:42:48 +0000 (+0000) Subject: Fixed memory leak if zero parameters are passed, Thanks Felipe X-Git-Tag: php-5.4.0alpha1~191^2~3193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fddd5d940cb6c81121902470f9c25150a9767671;p=php Fixed memory leak if zero parameters are passed, Thanks Felipe --- diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index c22583b80c..6208aaa536 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1800,7 +1800,9 @@ ZEND_METHOD(reflection_function, invoke) result = zend_call_function(&fci, &fcc TSRMLS_CC); - efree(params); + if (num_args) { + efree(params); + } if (result == FAILURE) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,