focus_manager: fix memory leaks

_set_a_without_b() makes a list clone internally, so cloning the list
first will leak a copy.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7622
This commit is contained in:
Derek Foreman 2019-01-14 19:01:05 -06:00
parent 1933580efb
commit 5f207d79e3
1 changed files with 2 additions and 4 deletions

View File

@ -63,8 +63,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd)
eina_iterator_free(borders);
//elements which are not in the current border elements
tmp = eina_list_clone(pd->current_border);
tmp = _set_a_without_b(tmp , selection);
tmp = _set_a_without_b(pd->current_border, selection);
EINA_LIST_FREE(tmp, node)
{
@ -73,8 +72,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd)
}
//set of the elements which are new without those which are currently registered
tmp = eina_list_clone(selection);
tmp = _set_a_without_b(tmp, pd->current_border);
tmp = _set_a_without_b(selection, pd->current_border);
EINA_LIST_FREE(tmp, node)
{