From c3577929b38803b6454cfb1a9cc552cd52d082d2 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 3 Jan 2021 19:35:20 +0000 Subject: [PATCH] elm - genlist - fix leak if someone steals objects on unrealize elm_genlist_item_all_contents_unset() can steal away the item content. this is how you do a cache of your own objects... BUT this meant genlist couldnt remove its hash entires... as it lost them. this fixes that. leak fixed. (this affected evisum) @fix --- src/lib/elementary/elm_genlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index d25dbe1f57..342d26e0d3 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -7410,6 +7410,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Evas_Object *content; ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); + ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); EINA_LIST_FREE(it->contents, content) { @@ -7417,6 +7418,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, edje_object_part_unswallow(VIEW(it), content); evas_object_hide(content); if (l) *l = eina_list_append(*l, content); + eina_hash_del_by_key(sd->content_item_map, &content); } }