You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ma...@apache.org on 2008/08/01 12:52:48 UTC

svn commit: r681646 - /webservices/axis2/trunk/c/neethi/src/policy.c

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)
             {