eriksson Tue Feb 20 07:18:26 2001 EDT
Modified files:
/php4/ext/satellite object.c
Log:
Stop leaking ParameterType data
Index: php4/ext/satellite/object.c
diff -u php4/ext/satellite/object.c:1.4 php4/ext/satellite/object.c:1.5
--- php4/ext/satellite/object.c:1.4 Thu Nov 30 14:01:57 2000
+++ php4/ext/satellite/object.c Tue Feb 20 07:18:26 2001
@@ -17,7 +17,7 @@
*/
/*
- * $Id: object.c,v 1.4 2000/11/30 22:01:57 eriksson Exp $
+ * $Id: object.c,v 1.5 2001/02/20 15:18:26 eriksson Exp $
* vim: syntax=c tabstop=2 shiftwidth=2
*/
@@ -391,13 +391,18 @@
CORBA_Request request, OperationType * pOperation, int argumentCount,
const zval ** ppArguments, CORBA_NamedValue ** ppNamedValue)
{
- ParameterType * p_parameter = OperationType_GetFirstParameter(pOperation);
+ ParameterType * p_parameter = NULL;
int i = 0;
- zend_bool success;
+ zend_bool success = FALSE;
if (argumentCount < 1)
return TRUE; /* nothing to do */
+ p_parameter = OperationType_GetFirstParameter(pOperation);
+
+ if (NULL == p_parameter)
+ return FALSE; /* oups! */
+
do
{
ppNamedValue[i] = satellite_new(CORBA_NamedValue);
@@ -405,7 +410,7 @@
request, p_parameter, ppArguments[i], ppNamedValue[i]);
if (!success)
- return FALSE;
+ goto error;
i++;
} while (i < argumentCount && ParameterType_GetNext(p_parameter));
@@ -417,10 +422,19 @@
/* bad number of arguments */
wrong_param_count();
- return FALSE;
+ goto error;
}
- return TRUE;
+ success = TRUE;
+ goto exit;
+
+error:
+ success = FALSE;
+
+exit:
+ orbit_delete(p_parameter);
+ return success;
+
}
/*
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]