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 sa...@apache.org on 2006/03/24 14:18:50 UTC
svn commit: r388516 - /webservices/axis2/trunk/c/modules/util/hash.c
Author: samisa
Date: Fri Mar 24 05:18:48 2006
New Revision: 388516
URL: http://svn.apache.org/viewcvs?rev=388516&view=rev
Log:
Some more memory leak fixes
Modified:
webservices/axis2/trunk/c/modules/util/hash.c
Modified: webservices/axis2/trunk/c/modules/util/hash.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/hash.c?rev=388516&r1=388515&r2=388516&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/hash.c (original)
+++ webservices/axis2/trunk/c/modules/util/hash.c Fri Mar 24 05:18:48 2006
@@ -187,6 +187,7 @@
hi->this->next = new_array[i];
new_array[i] = hi->this;
}
+ AXIS2_FREE (ht->environment->allocator, ht->array);
ht->array = new_array;
ht->max = new_max;
}
@@ -298,6 +299,7 @@
he->val = val;
*hep = he;
ht->count++;
+ ht->array[hash & ht->max] = *hep;
return hep;
}
@@ -364,11 +366,13 @@
if (!val)
{
/* delete entry */
- axis2_hash_entry_t *old = *hep;
+ /*axis2_hash_entry_t *old = *hep;
*hep = (*hep)->next;
old->next = ht->free;
- ht->free = old;
+ ht->free = old;*/
--ht->count;
+ AXIS2_FREE(ht->environment->allocator, *hep);
+ *hep = NULL;
}
else
{