summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@efl.so>2013-11-17 09:11:56 +0100
committerCedric BAIL <cedric@efl.so>2013-11-17 12:20:02 +0100
commit425b39917248b0a64236ac33f0188c8d6c873a6b (patch)
tree393051864b511072a0660942d0afe69280d2c7fe /src
parenta1b503d0adfcdb881e4fa71bcb9cfc8dcb0e8314 (diff)
eina: remove the value from the hash before changing it !
This should fix bug T439.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina/eina_cow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_cow.c b/src/lib/eina/eina_cow.c
index 0d7dd3a4b7..ca99f5c596 100644
--- a/src/lib/eina/eina_cow.c
+++ b/src/lib/eina/eina_cow.c
@@ -430,6 +430,7 @@ eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data)
430#endif 430#endif
431 ref->refcount--; 431 ref->refcount--;
432 432
433 if (ref->refcount == 0) _eina_cow_hash_del(cow, *data, ref);
433 *data = (Eina_Cow_Data*) cow->default_value; 434 *data = (Eina_Cow_Data*) cow->default_value;
434 435
435 if (ref->refcount > 0) 436 if (ref->refcount > 0)
@@ -443,7 +444,6 @@ eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data)
443#ifdef EINA_COW_MAGIC_ON 444#ifdef EINA_COW_MAGIC_ON
444 EINA_MAGIC_SET(ref, EINA_MAGIC_NONE); 445 EINA_MAGIC_SET(ref, EINA_MAGIC_NONE);
445#endif 446#endif
446 _eina_cow_hash_del(cow, *data, ref);
447 _eina_cow_togc_del(cow, ref); 447 _eina_cow_togc_del(cow, ref);
448 eina_mempool_free(cow->pool, (void*) ref); 448 eina_mempool_free(cow->pool, (void*) ref);
449} 449}