store: fix a crash occuring when elm_store_free function is invoked and a mem leak when genlist object is deleted.

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit is contained in:
Lukasz Stanislawski 2013-03-25 12:28:08 +09:00 committed by Cedric BAIL
parent 3fd2a7ccfa
commit 745b8d63f8
1 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,7 @@ _store_genlist_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
}
eina_lock_release(&sti->lock);
eina_lock_free(&sti->lock);
st->items = NULL;
st->items = eina_inlist_remove(st->items, EINA_INLIST_GET(sti));
free(sti);
}
// FIXME: kill threads and more
@ -576,6 +576,7 @@ elm_store_free(Elm_Store *st)
}
eina_lock_release(&sti->lock);
eina_lock_free(&sti->lock);
st->items = eina_inlist_remove(st->items, EINA_INLIST_GET(sti));
free(sti);
}
if (st->genlist)