axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r382700 - in /webservices/axis2/trunk/c/modules/core: deployment/arch_file_data.c description/svc_grp.c
Date Fri, 03 Mar 2006 07:17:57 GMT
Author: damitha
Date: Thu Mar  2 23:17:54 2006
New Revision: 382700

URL: http://svn.apache.org/viewcvs?rev=382700&view=rev
Log:
Now services are freed by arch_file_data instead of service group.
Otherwise there will be leaks in exception flows

Modified:
    webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
    webservices/axis2/trunk/c/modules/core/description/svc_grp.c

Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c?rev=382700&r1=382699&r2=382700&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c Thu Mar  2 23:17:54
2006
@@ -274,6 +274,22 @@
     
     if(file_data_impl->svc_map)
     {
+        axis2_hash_index_t *hi = NULL;
+        void *val = NULL;
+
+        for (hi = axis2_hash_first (file_data_impl->svc_map, env); hi;
+                 hi = axis2_hash_next ( env, hi))
+        {
+            axis2_svc_t *svc = NULL;
+            axis2_hash_this (hi, NULL, NULL, &val);
+            svc = (axis2_svc_t *) val;
+            if (svc)
+            {
+                AXIS2_SVC_FREE (svc, env);
+                svc = NULL;
+            }
+            val = NULL;
+        }
         axis2_hash_free(file_data_impl->svc_map, env);
         file_data_impl->svc_map = NULL;        
     }

Modified: webservices/axis2/trunk/c/modules/core/description/svc_grp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/svc_grp.c?rev=382700&r1=382699&r2=382700&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc_grp.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc_grp.c Thu Mar  2 23:17:54 2006
@@ -275,22 +275,7 @@
     
     if(NULL != svc_grp_impl->svcs)
     {
-        axis2_hash_index_t *hi = NULL;
-        void *val = NULL;
-        for (hi = axis2_hash_first (svc_grp_impl->svcs, env); hi;
-                 hi = axis2_hash_next ( env, hi))
-        {
-            axis2_svc_t *svc = NULL;
-            axis2_hash_this (hi, NULL, NULL, &val);
-            svc = (axis2_svc_t *) val;
-            if (svc)
-            {
-                AXIS2_SVC_FREE (svc, env);
-                svc = NULL;
-            }
-            val = NULL;
-               
-        }
+        /* Services are freed by arch_file_data */
         axis2_hash_free(svc_grp_impl->svcs, env);
         svc_grp_impl->svcs = NULL;
     }



Mime
View raw message