Author: damitha
Date: Sun Jan 27 09:46:05 2008
New Revision: 615619

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

Modified:
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
    webservices/sandesha/trunk/c/src/wsrm/msg_number.c

Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?rev=615619&r1=615618&r2=615619&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Sun Jan 
27 09:46:05 2008
@@ -832,7 +832,6 @@
     axiom_soap_envelope_t *soap_env = NULL;
     axis2_endpoint_ref_t *to_epr = NULL;
     sandesha2_seq_property_bean_t *out_seq_bean = NULL;
-    axis2_char_t *msg_id = NULL;
     axis2_char_t *op_name = NULL;
     axis2_char_t *to_addr = NULL;
     axis2_op_ctx_t *op_ctx = NULL;
@@ -1284,9 +1283,12 @@
             AXIOM_SOAP12);
         sandesha2_msg_ctx_set_soap_envelope(rm_msg_ctx, env, soap_env);
     }
-    msg_id = axutil_uuid_gen(env);
     if(!sandesha2_msg_ctx_get_msg_id(rm_msg_ctx, env))
+    {
+        axis2_char_t *msg_id = NULL;
+        msg_id = axutil_uuid_gen(env);
         sandesha2_msg_ctx_set_msg_id(rm_msg_ctx, env, msg_id);
+    }
         
     if(is_svr_side)
     {

Modified: webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c?rev=615619&r1=615618&r2=615619&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Sun Jan 27 
09:46:05 2008
@@ -127,8 +127,8 @@
             sender_mgr);
         continue_sending = AXIS2_FALSE;
     }
-    /*if(rm_msg_ctx)
-        sandesha2_msg_ctx_free(rm_msg_ctx, env);*/
+    if(rm_msg_ctx)
+        sandesha2_msg_ctx_free(rm_msg_ctx, env);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2]Exit:sandesha2_msg_retrans_adjuster_adjust_retrans");
     return continue_sending;

Modified: webservices/sandesha/trunk/c/src/wsrm/msg_number.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/msg_number.c?rev=615619&r1=615618&r2=615619&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/msg_number.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/msg_number.c Sun Jan 27 09:46:05 2008
@@ -82,7 +82,7 @@
     sandesha2_msg_number_t *msg_number, 
        const axutil_env_t *env)
 {
-    if(NULL != msg_number->ns_val)
+    if(msg_number->ns_val)
     {
         AXIS2_FREE(env->allocator, msg_number->ns_val);
         msg_number->ns_val = NULL;



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

Reply via email to