ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r681646 - /webservices/axis2/trunk/c/neethi/src/policy.c
Date Fri, 01 Aug 2008 10:52:48 GMT
Author: manjula
Date: Fri Aug  1 03:52:47 2008
New Revision: 681646

URL: http://svn.apache.org/viewvc?rev=681646&view=rev
Log:
Fixing memory leak related to recent Neethi code changes.

Modified:
    webservices/axis2/trunk/c/neethi/src/policy.c

Modified: webservices/axis2/trunk/c/neethi/src/policy.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/policy.c?rev=681646&r1=681645&r2=681646&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/policy.c (original)
+++ webservices/axis2/trunk/c/neethi/src/policy.c Fri Aug  1 03:52:47 2008
@@ -128,11 +128,18 @@
     {
         axutil_hash_index_t *hi = NULL;
         void *val = NULL;
+        const void *key = NULL;
 
         for (hi = axutil_hash_first(attributes, env); hi;
              hi = axutil_hash_next(env, hi))
         {
-            axutil_hash_this(hi, NULL, NULL, &val);
+            axutil_hash_this(hi, &key, NULL, &val);
+
+            if(key)
+            {
+                AXIS2_FREE(env->allocator, (axis2_char_t *)key);
+                key = NULL;
+            }
 
             if (val)
             {



Mime
View raw message