diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2009-07-01 17:43:16 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2009-07-01 17:43:16 +0000 |
commit | e536b2700ac604239aee33989621e0f3d89c8723 (patch) | |
tree | 3cc5ed153a3248c173a14fb3a693685f8d85eba5 /ext/reflection/php_reflection.c | |
parent | 937809f447d84511f8d6182a81784a55f4a6d1f8 (diff) | |
download | php-git-e536b2700ac604239aee33989621e0f3d89c8723.tar.gz |
MFH: Fixed memory leak if zero parameters are passed, Thanks Felipe
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 421a0aae7c..e1a941991e 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1754,7 +1754,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, |