Author: damitha
Date: Wed Jan  9 00:53:55 2008
New Revision: 610310

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

Modified:
    webservices/sandesha/trunk/c/include/sandesha2_identifier.h
    webservices/sandesha/trunk/c/include/sandesha2_msg_number.h
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
    webservices/sandesha/trunk/c/src/wsrm/identifier.c
    webservices/sandesha/trunk/c/src/wsrm/msg_number.c
    webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
    webservices/sandesha/trunk/c/src/wsrm/sequence.c

Modified: webservices/sandesha/trunk/c/include/sandesha2_identifier.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_identifier.h?rev=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_identifier.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_identifier.h Wed Jan  9 
00:53:55 2008
@@ -49,6 +49,11 @@
     sandesha2_iom_rm_element_t element;
 };
 
+axis2_status_t AXIS2_CALL
+sandesha2_identifier_free_void_arg(
+    void *identifier,
+    const axutil_env_t *env);
+
 AXIS2_EXTERN sandesha2_identifier_t* AXIS2_CALL
 sandesha2_identifier_create(
     const axutil_env_t *env, 

Modified: webservices/sandesha/trunk/c/include/sandesha2_msg_number.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_msg_number.h?rev=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_msg_number.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_msg_number.h Wed Jan  9 
00:53:55 2008
@@ -66,6 +66,11 @@
     sandesha2_msg_number_ops_t *ops;
 };
 
+axis2_status_t AXIS2_CALL
+sandesha2_msg_number_free_void_arg(
+    void *msg_num,
+    const axutil_env_t *env);
+
 AXIS2_EXTERN sandesha2_msg_number_t* AXIS2_CALL
 sandesha2_msg_number_create(
                                                const axutil_env_t *env,

Modified: 
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c 
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Wed 
Jan  9 00:53:55 2008
@@ -211,6 +211,11 @@
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
 
+    if(storage_mgr_impl->bean_mgr)
+    {
+        sandesha2_permanent_bean_mgr_free(storage_mgr_impl->bean_mgr, env);
+        storage_mgr_impl->bean_mgr = NULL;
+    }
     if(storage_mgr_impl)
     {
         AXIS2_FREE(env->allocator, storage_mgr_impl);

Modified: webservices/sandesha/trunk/c/src/wsrm/identifier.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/identifier.c?rev=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/identifier.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/identifier.c Wed Jan  9 00:53:55 2008
@@ -115,6 +115,16 @@
        return &(identifier_impl->identifier);
 }
 
+axis2_status_t AXIS2_CALL
+sandesha2_identifier_free_void_arg(
+    void *identifier,
+    const axutil_env_t *env)
+{
+    sandesha2_iom_rm_element_t *identifier_l = NULL;
+
+    identifier_l = (sandesha2_iom_rm_element_t *) identifier;
+    return sandesha2_identifier_free(identifier_l, env);
+}
 
 static axis2_status_t AXIS2_CALL 
 sandesha2_identifier_free (

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=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/msg_number.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/msg_number.c Wed Jan  9 00:53:55 2008
@@ -132,6 +132,16 @@
        return &(msg_number_impl->msg_number);
 }
 
+axis2_status_t AXIS2_CALL
+sandesha2_msg_number_free_void_arg(
+    void *msg_num,
+    const axutil_env_t *env)
+{
+    sandesha2_iom_rm_element_t *msg_num_l = NULL;
+
+    msg_num_l = (sandesha2_iom_rm_element_t *) msg_num;
+    return sandesha2_msg_number_free(msg_num_l, env);
+}
 
 axis2_status_t AXIS2_CALL 
 sandesha2_msg_number_free (

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=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/rm_elements.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/rm_elements.c Wed Jan  9 00:53:55 2008
@@ -671,14 +671,16 @@
         headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
                         soap_header, env, AXIS2_WSA_NAMESPACE);
         if(headers && 0 < axutil_array_list_size(headers, env))
+        {
+            axutil_array_list_free(headers, env);
             return AXIS2_WSA_NAMESPACE;
+        }
             
         headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
                         soap_header, env, AXIS2_WSA_NAMESPACE_SUBMISSION); 
         if(headers && 0 < axutil_array_list_size(headers, env))
         {
-            if(headers)
-                axutil_array_list_free(headers, env);
+            axutil_array_list_free(headers, env);
             return AXIS2_WSA_NAMESPACE_SUBMISSION;
         }
         if(headers)

Modified: webservices/sandesha/trunk/c/src/wsrm/sequence.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/sequence.c?rev=610310&r1=610309&r2=610310&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/sequence.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/sequence.c Wed Jan  9 00:53:55 2008
@@ -166,8 +166,18 @@
         AXIS2_FREE(env->allocator, seq_impl->ns_val);
         seq_impl->ns_val = NULL;
     }
-    seq_impl->identifier = NULL;
-    seq_impl->msg_num = NULL;
+    if(seq_impl->identifier)
+    {
+        sandesha2_identifier_free_void_arg(
+            (sandesha2_iom_rm_element_t *)seq_impl->identifier, env);
+        seq_impl->identifier = NULL;
+    }
+    if(seq_impl->msg_num)
+    {
+        sandesha2_last_msg_free_void_arg(
+            (sandesha2_iom_rm_element_t *)seq_impl->msg_num, env);
+        seq_impl->msg_num = NULL;
+    }
     if(seq_impl->last_msg)
     {
         sandesha2_last_msg_free_void_arg(



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

Reply via email to