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/02/28 00:58:47 UTC

svn commit: r381499 - in /webservices/axis2/trunk/c/modules: core/context/msg_ctx.c xml/om/om_node.c xml/soap/soap_header.c

Author: samisa
Date: Mon Feb 27 15:58:42 2006
New Revision: 381499

URL: http://svn.apache.org/viewcvs?rev=381499&view=rev
Log:
Some fixes to ensure soap envelope is freed in message context

Modified:
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/xml/om/om_node.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_header.c

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?rev=381499&r1=381498&r2=381499&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Mon Feb 27 15:58:42 2006
@@ -665,6 +665,12 @@
         msg_ctx_impl->svc_grp_id = NULL;
     }
     
+    if (msg_ctx_impl->soap_envelope)
+    {
+        AXIS2_SOAP_ENVELOPE_FREE(msg_ctx_impl->soap_envelope, env);
+        msg_ctx_impl->soap_envelope = NULL;
+    }
+
     AXIS2_FREE((*env)->allocator, msg_ctx_impl);
     
     return AXIS2_SUCCESS;

Modified: webservices/axis2/trunk/c/modules/xml/om/om_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_node.c?rev=381499&r1=381498&r2=381499&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_node.c Mon Feb 27 15:58:42 2006
@@ -292,14 +292,16 @@
         while (node_impl->first_child)
         {
             child_node = AXIS2_OM_NODE_DETACH (node_impl->first_child, env);
-            AXIS2_OM_NODE_FREE_TREE ( child_node , env); 
+            if (child_node)
+            {
+                AXIS2_OM_NODE_FREE_TREE ( child_node , env); 
+            }
         }
     }
     
     switch (node_impl->node_type)
     {
     case AXIS2_OM_ELEMENT:
-        
         AXIS2_OM_ELEMENT_FREE((axis2_om_element_t*)(node_impl->data_element), env);
         break;
 
@@ -382,6 +384,7 @@
                 AXIS2_INTF_TO_IMPL(om_node)->next_sibling;
         }
     }
+    
     if (AXIS2_INTF_TO_IMPL(om_node)->next_sibling)
     {
         axis2_om_node_t *next_sibling = NULL;
@@ -392,6 +395,8 @@
     }
 
     AXIS2_INTF_TO_IMPL(om_node)->parent = NULL;
+    AXIS2_INTF_TO_IMPL(om_node)->prev_sibling = NULL;
+    AXIS2_INTF_TO_IMPL(om_node)->next_sibling = NULL;
     return om_node;
 
 }

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_header.c?rev=381499&r1=381498&r2=381499&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_header.c Mon Feb 27 15:58:42 2006
@@ -218,11 +218,12 @@
     {
         axis2_hash_index_t *hi = NULL;
         void *val = NULL;
+        void *key = NULL;
             
         for (hi = axis2_hash_first (header_impl->header_blocks ,env); hi;
                  hi = axis2_hash_next ( env, hi))
         {
-               axis2_hash_this (hi, NULL, NULL, &val);
+               axis2_hash_this (hi, &key, NULL, &val);
 
                 if (val)
                    AXIS2_SOAP_HEADER_BLOCK_FREE((axis2_soap_header_block_t *)val, env);