You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/03/22 11:32:46 UTC

svn commit: r387822 - in /webservices/axis2/trunk/c/modules: core/engine/addr_disp.c core/util/core_utils.c mod_addr/addr_out_handler.c

Author: sahan
Date: Wed Mar 22 02:32:44 2006
New Revision: 387822

URL: http://svn.apache.org/viewcvs?rev=387822&view=rev
Log:
More mem leak fixes

Modified:
    webservices/axis2/trunk/c/modules/core/engine/addr_disp.c
    webservices/axis2/trunk/c/modules/core/util/core_utils.c
    webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c

Modified: webservices/axis2/trunk/c/modules/core/engine/addr_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/addr_disp.c?rev=387822&r1=387821&r2=387822&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/addr_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/addr_disp.c Wed Mar 22 02:32:44 2006
@@ -130,7 +130,14 @@
                                 AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Service found using WSA enpoint address");
                         }
                     }                    
+                    AXIS2_FREE((*env)->allocator, url_tokens[0]);
                 }
+                if(url_tokens[1])
+                {
+                    AXIS2_FREE((*env)->allocator, url_tokens[1]);
+                }
+                AXIS2_FREE((*env)->allocator, url_tokens);
+                url_tokens = NULL; 
             }
         }
     }

Modified: webservices/axis2/trunk/c/modules/core/util/core_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/util/core_utils.c?rev=387822&r1=387821&r2=387822&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/util/core_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/util/core_utils.c Wed Mar 22 02:32:44 2006
@@ -46,6 +46,7 @@
     axis2_bool_t server_side = AXIS2_FALSE;
     axis2_svc_grp_ctx_t *svc_grp_ctx = NULL;
     axis2_property_t *property = NULL;
+    axis2_char_t *msg_uuid = NULL;
     
     AXIS2_PARAM_CHECK((*env)->error, in_msg_ctx, NULL);
     
@@ -72,7 +73,14 @@
             return NULL;
         AXIS2_MSG_CTX_SET_MSG_INFO_HEADERS(new_msg_ctx, env, msg_info_headers);
     }
-    AXIS2_MSG_INFO_HEADERS_SET_MESSAGE_ID(msg_info_headers, env, axis2_uuid_gen(env));
+
+    msg_uuid =  axis2_uuid_gen(env);
+    AXIS2_MSG_INFO_HEADERS_SET_MESSAGE_ID(msg_info_headers, env, msg_uuid);
+    if(NULL != msg_uuid)
+    {
+        AXIS2_FREE((*env)->allocator, msg_uuid);
+        msg_uuid = NULL;
+    }
     reply_to = AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO(old_msg_info_headers, env);
     AXIS2_MSG_INFO_HEADERS_SET_TO(msg_info_headers, env, reply_to);
     

Modified: webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c?rev=387822&r1=387821&r2=387822&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c Wed Mar 22 02:32:44 2006
@@ -445,8 +445,19 @@
         header_block_ele =
             (axis2_om_element_t *)
             AXIS2_OM_NODE_GET_DATA_ELEMENT (header_block_node, env);
-        AXIS2_OM_ELEMENT_SET_TEXT (header_block_ele, env, value,
-                                   header_block_node);
+        if(NULL != header_block_ele)
+        {
+            axis2_om_namespace_t *dec_ns = NULL;
+            AXIS2_OM_ELEMENT_SET_TEXT (header_block_ele, env, value,
+                                        header_block_node);
+            dec_ns = AXIS2_OM_ELEMENT_FIND_DECLARED_NAMESPACE(header_block_ele, env,
+                                                 addr_ns, AXIS2_WSA_DEFAULT_PREFIX);
+            if(! dec_ns)
+            {
+                 AXIS2_OM_NAMESPACE_FREE(addr_ns_obj, env);
+                 addr_ns_obj = NULL;
+            }
+        }
     }
     return header_block_node;
 }