You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2006/02/28 12:19:15 UTC

svn commit: r381636 - in /webservices/axis2/trunk/c/modules/core: description/module_desc.c engine/conf.c

Author: damitha
Date: Tue Feb 28 03:19:11 2006
New Revision: 381636

URL: http://svn.apache.org/viewcvs?rev=381636&view=rev
Log:
More memory leak fixes.

Modified:
    webservices/axis2/trunk/c/modules/core/description/module_desc.c
    webservices/axis2/trunk/c/modules/core/engine/conf.c

Modified: webservices/axis2/trunk/c/modules/core/description/module_desc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/module_desc.c?rev=381636&r1=381635&r2=381636&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/module_desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/module_desc.c Tue Feb 28 03:19:11 2006
@@ -264,16 +264,13 @@
     
     module_desc_impl = AXIS2_INTF_TO_IMPL(module_desc);
     
-    if(NULL != module_desc->ops)
-        AXIS2_FREE((*env)->allocator, module_desc->ops);
-    
-    if(NULL == module_desc->params)
+    if(module_desc->params)
     {
         AXIS2_PARAM_CONTAINER_FREE(module_desc->params, env);
         module_desc->params = NULL;
     }
     
-    if(NULL == module_desc->flow_container)
+    if(module_desc->flow_container)
     {
         AXIS2_FLOW_CONTAINER_FREE(module_desc->flow_container, env);
         module_desc->flow_container = NULL;
@@ -281,13 +278,13 @@
     
     module_desc_impl->parent = NULL;
     
-    if(NULL != module_desc_impl->qname)
+    if(module_desc_impl->qname)
     {
         AXIS2_QNAME_FREE(module_desc_impl->qname, env);
         module_desc_impl->qname = NULL;
     }
     
-    if(NULL != module_desc_impl->ops)
+    if(module_desc_impl->ops)
     {
         axis2_hash_index_t *hi = NULL;
         void *val = NULL;
@@ -308,9 +305,17 @@
         module_desc_impl->ops = NULL;
     }
     
+    if(module_desc->ops)
+    {
+        AXIS2_FREE((*env)->allocator, module_desc->ops);
+        module_desc->ops = NULL;
+    }
+    
     if(module_desc_impl)
+    {
         AXIS2_FREE((*env)->allocator, module_desc_impl);
-    module_desc_impl = NULL;
+        module_desc_impl = NULL;
+    }
     
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/conf.c?rev=381636&r1=381635&r2=381636&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Tue Feb 28 03:19:11 2006
@@ -653,6 +653,7 @@
                  hi = axis2_hash_next ( env, hi))
         {
             axis2_module_desc_t *module_desc = NULL;
+
             axis2_hash_this (hi, NULL, NULL, &val);
             module_desc = (axis2_module_desc_t *) val;
             if (module_desc)