fix memory corruption at free time.

That list pointer could be corrupted because
inside of the enventor_item_del(), the list head pointer could be modified.
This commit is contained in:
Hermet Park 2016-08-27 23:42:15 +09:00
parent 9504c8a634
commit c6cff4bef8
1 changed files with 6 additions and 2 deletions

View File

@ -94,8 +94,12 @@ static void
_enventor_sub_items_free(Enventor_Object_Data *pd)
{
Enventor_Item *it;
EINA_LIST_FREE(pd->sub_its, it)
enventor_item_del(it);
while(pd->sub_its)
{
it = eina_list_data_get(pd->sub_its);
enventor_item_del(it);
}
pd->sub_its = NULL;
}