You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/03/26 05:39:55 UTC
svn commit: r388874 -
/webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
Author: samisa
Date: Sat Mar 25 19:39:53 2006
New Revision: 388874
URL: http://svn.apache.org/viewcvs?rev=388874&view=rev
Log:
Some memory leak fixes
Modified:
webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
Modified: webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c?rev=388874&r1=388873&r2=388874&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c Sat Mar 25 19:39:53 2006
@@ -193,6 +193,8 @@
AXIS2_OM_NODE_SERIALIZE (ret_node, &env, om_output);
buffer = AXIS2_XML_WRITER_GET_XML(writer, &env);
printf ("\nReceived OM node in XML : %s\n", buffer);
+ AXIS2_FREE(env->allocator, buffer);
+ AXIS2_OM_OUTPUT_FREE(om_output, &env);
}
else
{
@@ -202,6 +204,16 @@
printf("echo stub invoke failed!\n");
}
+ if (msg_ctx)
+ {
+ AXIS2_MSG_CTX_FREE(msg_ctx, &env);
+ msg_ctx = NULL;
+ }
+ if (response_ctx)
+ {
+ AXIS2_MSG_CTX_FREE(response_ctx, &env);
+ response_ctx = NULL;
+ }
if (call)
{
AXIS2_CALL_FREE(call, &env);
@@ -239,6 +251,8 @@
AXIS2_OM_NODE_SERIALIZE(echo_om_node, env, om_output);
buffer = AXIS2_XML_WRITER_GET_XML(xml_writer, env);
printf("\nSending OM node in XML : %s \n", buffer);
+ AXIS2_FREE((*env)->allocator, buffer);
+ AXIS2_OM_OUTPUT_FREE(om_output, env);
return echo_om_node;
}