]> granicus.if.org Git - php/commitdiff
- Fix leak
authorAndi Gutmans <andi@php.net>
Mon, 1 Mar 2004 17:43:57 +0000 (17:43 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 1 Mar 2004 17:43:57 +0000 (17:43 +0000)
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

index 4b5c9b4167a366b1ff3b6fb22fd1bc16938fa456..f15783827399b5cf9cfdeb2c79f7a69b743dd41a 100644 (file)
@@ -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 */
                }
index 4b5c9b4167a366b1ff3b6fb22fd1bc16938fa456..f15783827399b5cf9cfdeb2c79f7a69b743dd41a 100644 (file)
@@ -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 */
                }