From 39476fad326e60b277fb6f2f2cd604e800a3e7a5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Jan 2017 11:52:52 -0500 Subject: [PATCH] do not double-free lists during luncher bar empty ==15191== Invalid read of size 8 ==15191== at 0x2B6328A7: eina_list_next (eina_inline_list.x:32) ==15191== by 0x2B637520: _bar_empty (bar.c:1405) ==15191== by 0x2B639301: _bar_recalculate_job (bar.c:1958) ==15191== by 0xDBDA800: _ecore_job_event_handler (ecore_job.c:98) ==15191== by 0xDBD3AC6: _ecore_call_handler_cb (ecore_private.h:317) ==15191== by 0xDBD4A55: _ecore_event_call (ecore_events.c:518) ==15191== by 0xDBDDABF: _ecore_main_loop_iterate_internal (ecore_main.c:2380) ==15191== by 0xDBDB86D: ecore_main_loop_begin (ecore_main.c:1290) ==15191== by 0x441A94: main (e_main.c:1093) ==15191== Address 0x1ff97dc8 is 6,520 bytes inside a recently re-allocated block of size 8,192 alloc'd --- src/modules/luncher/bar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c index 46cc70f99..072c5729d 100644 --- a/src/modules/luncher/bar.c +++ b/src/modules/luncher/bar.c @@ -1398,13 +1398,9 @@ _bar_empty(Instance *inst) { if (inst->icons) { - Icon *ic; - Eina_List *l; - elm_box_clear(inst->o_icon_con); - EINA_LIST_FOREACH(inst->icons, l, ic) - _bar_icon_del(inst, ic); - eina_list_free(inst->icons); + while (inst->icons) + _bar_icon_del(inst, eina_list_data_get(inst->icons)); inst->icons = NULL; } }