From fddd5d940cb6c81121902470f9c25150a9767671 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Wed, 1 Jul 2009 17:42:48 +0000 Subject: [PATCH] Fixed memory leak if zero parameters are passed, Thanks Felipe --- ext/reflection/php_reflection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.40.0