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
This commit is contained in:
Mike Blumenkrantz 2017-01-20 11:52:52 -05:00
parent 75224784bd
commit 39476fad32
1 changed files with 2 additions and 6 deletions

View File

@ -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;
}
}