axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r388874 - /webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
Date Sun, 26 Mar 2006 03:39:55 GMT
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;
 }



Mime
View raw message