Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        ecore_hash.c 


Log Message:
Avoid potential recursion on the destruction of a collision chain.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_hash.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ecore_hash.c        16 Nov 2005 22:17:11 -0000      1.19
+++ ecore_hash.c        17 Nov 2005 06:39:14 -0000      1.20
@@ -182,9 +182,16 @@
 
        while (i < ecore_prime_table[hash->size]) {
                if (hash->buckets[i]) {
-                       _ecore_hash_bucket_destroy(hash->buckets[i],
-                                       hash->free_key, hash->free_value);
+                       Ecore_Hash_Node *bucket;
+
+                       /*
+                        * Remove the bucket list to avoid possible recursion
+                        * on the free callbacks.
+                        */
+                       bucket = hash->buckets[i];
                        hash->buckets[i] = NULL;
+                       _ecore_hash_bucket_destroy(bucket,
+                                       hash->free_key, hash->free_value);
                }
                i++;
        }




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to