Author: damitha
Date: Wed Jan  9 03:18:01 2008
New Revision: 610341

URL: http://svn.apache.org/viewvc?rev=610341&view=rev
Log:
Fixing memory leaks

Modified:
    webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c
    webservices/sandesha/trunk/c/src/wsrm/ack_range.c

Modified: 
webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c?rev=610341&r1=610340&r2=610341&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c 
(original)
+++ webservices/sandesha/trunk/c/src/transport/sandesha2_transport_sender.c Wed 
Jan  9 03:18:01 2008
@@ -189,6 +189,8 @@
     sandesha2_storage_mgr_update_msg_ctx(storage_mgr, env, key, msg_ctx);
     if(storage_mgr)
         sandesha2_storage_mgr_free(storage_mgr, env);
+    if(msg_ctx)
+        axis2_msg_ctx_free(msg_ctx, env);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
          "[sandesha2]Exit:sandesha2_transport_sender_invoke");
     return AXIS2_SUCCESS;

Modified: webservices/sandesha/trunk/c/src/util/terminate_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/terminate_mgr.c?rev=610341&r1=610340&r2=610341&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Wed Jan  9 03:18:01 
2008
@@ -843,6 +843,8 @@
     sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, terminate_added);
     
     msg_ctx1 = sandesha2_msg_ctx_get_msg_ctx(terminate_rm_msg, env);
+    if(terminate_rm_msg)
+        sandesha2_msg_ctx_free(terminate_rm_msg, env);
     transport_out = axis2_msg_ctx_get_transport_out_desc(msg_ctx1, env);
     
     property = axutil_property_create_with_args(env, 0, 0,

Modified: webservices/sandesha/trunk/c/src/wsrm/ack_range.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/ack_range.c?rev=610341&r1=610340&r2=610341&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/ack_range.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/ack_range.c Wed Jan  9 03:18:01 2008
@@ -258,24 +258,28 @@
         return NULL;
     }
     /*lower_attr = axiom_attribute_create(env, SANDESHA2_WSRM_COMMON_LOWER,
-                        lower_str, rm_ns);*/
+        lower_str, rm_ns);*/
     lower_attr = axiom_attribute_create(env, SANDESHA2_WSRM_COMMON_LOWER,
-                        lower_str, NULL);
-    if(NULL == lower_attr)
+        lower_str, NULL);
+    if(lower_str)
+        AXIS2_FREE(env->allocator, lower_str);
+    if(!lower_attr)
     {
         return NULL;
     }
     /*upper_attr = axiom_attribute_create(env, SANDESHA2_WSRM_COMMON_UPPER,
-                        upper_str, rm_ns);*/
+        upper_str, rm_ns);*/
     upper_attr = axiom_attribute_create(env, SANDESHA2_WSRM_COMMON_UPPER,
-                        upper_str, NULL);
-    if(NULL == upper_attr)
+        upper_str, NULL);
+    if(upper_str)
+        AXIS2_FREE(env->allocator, upper_str);
+    if(!upper_attr)
     {
         return NULL;
     }
     ar_element = axiom_element_create(env, (axiom_node_t*)om_node, 
-                        SANDESHA2_WSRM_COMMON_ACK_RANGE, rm_ns, &ar_node);
-    if(NULL == ar_element)
+        SANDESHA2_WSRM_COMMON_ACK_RANGE, rm_ns, &ar_node);
+    if(!ar_element)
     {
         return NULL;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to