summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2015-10-01 19:03:29 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-10-01 19:06:29 +0900
commitde2ba979f7064ceccec4f65e6e99022594514e4c (patch)
tree61dd75eddc0a397e61d5fc86b01edd46b9d5c1de
parente87cc4ec9d40ca682803ab2b7d80eeec14559c05 (diff)
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 <k.navneet@samsung.com> Signed-Off By: Shilpa Singh <shilpa.singh@samsung.com> 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
-rw-r--r--src/lib/elc_multibuttonentry.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index fd608b137..f27ee33d3 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -1533,6 +1533,7 @@ EOLIAN static void
1533_elm_multibuttonentry_evas_object_smart_del(Eo *obj, Elm_Multibuttonentry_Data *sd) 1533_elm_multibuttonentry_evas_object_smart_del(Eo *obj, Elm_Multibuttonentry_Data *sd)
1534{ 1534{
1535 Elm_Object_Item *eo_item; 1535 Elm_Object_Item *eo_item;
1536 Elm_Multibuttonentry_Item_Filter *_item_filter = NULL;
1536 1537
1537 EINA_LIST_FREE(sd->items, eo_item) 1538 EINA_LIST_FREE(sd->items, eo_item)
1538 eo_del(eo_item); 1539 eo_del(eo_item);
@@ -1549,6 +1550,9 @@ _elm_multibuttonentry_evas_object_smart_del(Eo *obj, Elm_Multibuttonentry_Data *
1549 evas_object_del(sd->end); 1550 evas_object_del(sd->end);
1550 ecore_timer_del(sd->longpress_timer); 1551 ecore_timer_del(sd->longpress_timer);
1551 1552
1553 EINA_LIST_FREE(sd->filter_list, _item_filter)
1554 _filter_free(_item_filter);
1555
1552 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 1556 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
1553} 1557}
1554 1558