You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2008/08/02 19:17:40 UTC

svn commit: r682018 - /webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c

Author: damitha
Date: Sat Aug  2 10:17:39 2008
New Revision: 682018

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

Modified:
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c?rev=682018&r1=682017&r2=682018&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c Sat Aug  2 10:17:39 2008
@@ -247,10 +247,14 @@
     AXIS2_PARAM_CHECK(env->error, next_msg_mgr, AXIS2_FAILURE);
     
     find_bean = sandesha2_next_msg_bean_create(env);
-    sandesha2_next_msg_bean_set_seq_id(find_bean, env, seq_id);
+    if(find_bean)
+    {
+        sandesha2_next_msg_bean_set_seq_id(find_bean, env, seq_id);
     
-    found_list = sandesha2_next_msg_mgr_find(next_msg_mgr, env, find_bean);
-    sandesha2_next_msg_bean_free(find_bean, env);
+        found_list = sandesha2_next_msg_mgr_find(next_msg_mgr, env, find_bean);
+        sandesha2_next_msg_bean_free(find_bean, env);
+    }
+
     if(found_list)
     {
         size = axutil_array_list_size(found_list, env);
@@ -274,9 +278,9 @@
                 {
                     sandesha2_next_msg_mgr_remove(next_msg_mgr, env, temp_seq_id);
                 }
+
+                sandesha2_next_msg_bean_free(bean, env);
             }
-            
-            sandesha2_next_msg_bean_free(bean, env);
         }
 
         axutil_array_list_free(found_list, env);
@@ -345,7 +349,9 @@
                     if(!axutil_strcmp(value, seq_id))
                     {
                         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                            "[sandesha2]Removing seq id:%s from the all incoming sequence list", value);
+                            "[sandesha2] Removing seq id:%s from the all incoming sequence list", 
+                            value);
+
                         axutil_array_list_remove(all_seq_list, env, i);
                         AXIS2_FREE(env->allocator, value);
                         break;
@@ -381,9 +387,13 @@
     }
 
     find_seq_prop_bean = sandesha2_seq_property_bean_create(env);
-    sandesha2_seq_property_bean_set_seq_id(find_seq_prop_bean, env, seq_id);
-    found_list = sandesha2_seq_property_mgr_find(seq_prop_mgr, env, find_seq_prop_bean);
-    sandesha2_seq_property_bean_free(find_seq_prop_bean, env);
+    if(find_seq_prop_bean)
+    {
+        sandesha2_seq_property_bean_set_seq_id(find_seq_prop_bean, env, seq_id);
+        found_list = sandesha2_seq_property_mgr_find(seq_prop_mgr, env, find_seq_prop_bean);
+        sandesha2_seq_property_bean_free(find_seq_prop_bean, env);
+    }
+
     if(found_list)
     {
         int i = 0, size = 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org