From: Shilpa Singh Date: Thu, 1 Oct 2015 10:03:29 +0000 (+0900) Subject: elc_multibuttonentry: Memory leak fix. X-Git-Tag: upstream/1.20.0~7116^2~14^2~610 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f40e53fbf65b3a5ccf8254efbea702088224b50;p=platform%2Fupstream%2Fefl.git elc_multibuttonentry: Memory leak fix. Summary: If item filters are appended and multibuttonentry is deleted, the filter list is not freed causing leak Signed-Off By: Kumar Navneet Signed-Off By: Shilpa Singh Test Plan: append item filters and when multibuttonentry is deleted leak is observed, run valgrind in this scenario. Reviewers: Hermet, cedric, CHAN Subscribers: navnbeet Differential Revision: https://phab.enlightenment.org/D3118 --- diff --git a/legacy/elementary/src/lib/elc_multibuttonentry.c b/legacy/elementary/src/lib/elc_multibuttonentry.c index 52d8429..3078cf5 100644 --- a/legacy/elementary/src/lib/elc_multibuttonentry.c +++ b/legacy/elementary/src/lib/elc_multibuttonentry.c @@ -1575,6 +1575,7 @@ EOLIAN static void _elm_multibuttonentry_evas_object_smart_del(Eo *obj, Elm_Multibuttonentry_Data *sd) { Elm_Object_Item *eo_item; + Elm_Multibuttonentry_Item_Filter *_item_filter = NULL; EINA_LIST_FREE(sd->items, eo_item) eo_del(eo_item); @@ -1591,6 +1592,9 @@ _elm_multibuttonentry_evas_object_smart_del(Eo *obj, Elm_Multibuttonentry_Data * evas_object_del(sd->end); ecore_timer_del(sd->longpress_timer); + EINA_LIST_FREE(sd->filter_list, _item_filter) + _filter_free(_item_filter); + eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); }