On Wed, Jun 1, 2011 at 1:30 AM, Lucas De Marchi <[email protected]> wrote: > On Tue, May 31, 2011 at 5:56 PM, Vincent Torri <[email protected]> wrote: >> On Tue, 31 May 2011, Enlightenment SVN wrote: >>> Log: >>> [Edje] Make sure ed->members isn't NULL when freeing an Edje object. >>> >>> >>> >>> Author: acidx >>> Date: 2011-05-31 11:27:28 -0700 (Tue, 31 May 2011) >>> New Revision: 59853 >>> Trac: http://trac.enlightenment.org/e/changeset/59853 >>> >>> Modified: >>> trunk/edje/src/lib/edje_main.c >>> >>> Modified: trunk/edje/src/lib/edje_main.c >>> =================================================================== >>> --- trunk/edje/src/lib/edje_main.c 2011-05-31 18:05:31 UTC (rev 59852) >>> +++ trunk/edje/src/lib/edje_main.c 2011-05-31 18:27:28 UTC (rev 59853) >>> @@ -201,7 +201,7 @@ >>> free(cb); >>> } >>> >>> - eina_hash_free(ed->members); >>> + if (ed->members) eina_hash_free(ed->members); >> >> eina_hash_free has a check : >> >> EINA_MAGIC_CHECK_HASH(hash); >> EINA_SAFETY_ON_NULL_RETURN(hash); > > EINA_SAFETY_* will just protect of program taking a wrong path, which > will be properly logged so user sees there's something wrong. > > > If it's ok to have ed->members as NULL at that place, then yes, the > coded added is needed.
Yes it is sadly needed. It was a long fight, but we did agree a long time ago that we should do that check in the caller. Just forgot to do it. -- Cedric BAIL ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
