From 161ed69721b64b6f04b015f0bba30a09cbed3652 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Mon, 1 Mar 2004 17:43:57 +0000 Subject: [PATCH] - Fix leak --- Zend/zend_reflection_api.c | 2 +- ext/reflection/php_reflection.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c index 4b5c9b4167..f157838273 100644 --- a/Zend/zend_reflection_api.c +++ b/Zend/zend_reflection_api.c @@ -1614,13 +1614,13 @@ ZEND_METHOD(reflection_method, invoke) } else { if ((Z_TYPE_PP(params[0]) != IS_OBJECT)) { efree(params); - _DO_THROW("Non-object passed to Invoke()"); /* Returns from this function */ } obj_ce = Z_OBJCE_PP(params[0]); if (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC)) { + efree(params); _DO_THROW("Given object is not an instance of the class this method was declared in"); /* Returns from this function */ } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 4b5c9b4167..f157838273 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1614,13 +1614,13 @@ ZEND_METHOD(reflection_method, invoke) } else { if ((Z_TYPE_PP(params[0]) != IS_OBJECT)) { efree(params); - _DO_THROW("Non-object passed to Invoke()"); /* Returns from this function */ } obj_ce = Z_OBJCE_PP(params[0]); if (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC)) { + efree(params); _DO_THROW("Given object is not an instance of the class this method was declared in"); /* Returns from this function */ } -- 2.50.1