Author: damitha
Date: Fri Jan  4 19:56:41 2008
New Revision: 609087

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

Modified:
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
    webservices/sandesha/trunk/c/src/wsrm/rm_elements.c

Modified: webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/sandesha2_utils.c?rev=609087&r1=609086&r2=609087&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Fri Jan  4 19:56:41 
2008
@@ -129,6 +129,8 @@
     millis = millis + seconds;
 
     return millis;*/
+    if(tp)
+        AXIS2_FREE(env->allocator, tp);
     return seconds;
 }
 

Modified: webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/rm_elements.c?rev=609087&r1=609086&r2=609087&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/rm_elements.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/rm_elements.c Fri Jan  4 19:56:41 2008
@@ -601,11 +601,19 @@
         headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
             soap_header, env, SANDESHA2_SPEC_2005_02_NS_URI);
         if(headers && 0 < axutil_array_list_size(headers, env))
+        {
+            if(headers)
+                axutil_array_list_free(headers, env);
             return SANDESHA2_SPEC_2005_02_NS_URI;
+        }
         headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
             soap_header, env, SANDESHA2_SPEC_2006_08_NS_URI);                
         if(headers && 0 < axutil_array_list_size(headers, env))
+        {
+            if(headers)
+                axutil_array_list_free(headers, env);
             return SANDESHA2_SPEC_2006_08_NS_URI;
+        }
     }
     if(!action)
         return NULL;



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

Reply via email to