On Thu, 29 Mar 2012 10:46:17 -0700
"Enlightenment SVN" <no-re...@enlightenment.org> wrote:

> Log:
> 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. 
> 
> Author:       sachiel
> Date:         2012-03-29 10:46:17 -0700 (Thu, 29 Mar 2012)
> New Revision: 69763
> Trac:         http://trac.enlightenment.org/e/changeset/69763
> 
> Modified:
>   trunk/eina/ChangeLog trunk/eina/src/lib/eina_hash.c 
> 
> Modified: trunk/eina/ChangeLog
> ===================================================================
> --- trunk/eina/ChangeLog      2012-03-29 17:39:01 UTC (rev 69762)
> +++ trunk/eina/ChangeLog      2012-03-29 17:46:17 UTC (rev 69763)
> @@ -241,3 +241,7 @@
>  2012-03-16  Raphael Kubo da Costa
>  
>       * 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().
> 
> Modified: trunk/eina/src/lib/eina_hash.c
> ===================================================================
> --- trunk/eina/src/lib/eina_hash.c    2012-03-29 17:39:01 UTC (rev 69762)
> +++ trunk/eina/src/lib/eina_hash.c    2012-03-29 17:46:17 UTC (rev 69763)
> @@ -1136,7 +1136,10 @@
>         }
>       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);
> +            hash->data_free_cb = cb;
>         }
>  
>          return old_data;
> 
> 

may raster have mercy on their poor souls

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to