When user manually free the ecore evas,
it could delete evas internally,
then evas_invalidate would be triggered,
invalidate callback would try free evas again,
this causes double free evas.
TEST SCENARIO:
ee = ecore_evas_new(...);
...
ecore_evas_free(ee);
-> free evas
-> invalidated cb
-> free evas (**double free)
This is a regression bug by
5847886a3fdb7c470bd55e215b822bbbaf109080
Change-Id: I954f605e69c2c92270c4e0c17f8d2198cedac3b5
if (ee->engine.func->fn_evas_engine_rsc_free)
ee->engine.func->fn_evas_engine_rsc_free(ee);
//
- if (!ee->evas_dying) evas_free(ee->evas);
+ if (!ee->evas_dying)
+ {
+ ee->evas_dying = EINA_TRUE;
+ evas_free(ee->evas);
+ }
ee->evas = NULL;
ECORE_MAGIC_SET(ee, ECORE_MAGIC_NONE);
ee->driver = NULL;
_ecore_evas_event_del(void *data, const Efl_Event *ev EINA_UNUSED)
{
Ecore_Evas *ee = data;
+ if (ee->evas_dying) return;
ee->evas_dying = EINA_TRUE;
ecore_evas_free(ee);