forked from enlightenment/efl
Hack to avoid freeing old data when calling eina_hash_set() with new_data == NULL. Let's have a minute of silence for all the innocent children that died because of this very grave error.
SVN revision: 69763
This commit is contained in:
parent
f745e537f5
commit
73bed950b0
|
@ -241,3 +241,7 @@
|
||||||
2012-03-16 Raphael Kubo da Costa
|
2012-03-16 Raphael Kubo da Costa
|
||||||
|
|
||||||
* Adjust Valgrind's CFLAGS to fix the build when it is in a non-default location.
|
* Adjust Valgrind's CFLAGS to fix the build when it is in a non-default location.
|
||||||
|
|
||||||
|
2012-03-29 Iván Briano
|
||||||
|
|
||||||
|
* Avoid freeing old data before returning it on eina_hash_set().
|
||||||
|
|
|
@ -1136,7 +1136,10 @@ eina_hash_set(Eina_Hash *hash, const void *key, const void *data)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Eina_Free_Cb cb = hash->data_free_cb;
|
||||||
|
hash->data_free_cb = NULL;
|
||||||
_eina_hash_del_by_hash_el(hash, hash_element, hash_head, key_hash);
|
_eina_hash_del_by_hash_el(hash, hash_element, hash_head, key_hash);
|
||||||
|
hash->data_free_cb = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
return old_data;
|
return old_data;
|
||||||
|
|
Loading…
Reference in New Issue