aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-14 19:01:05 -0600
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-15 13:47:21 -0600
commit5f207d79e352ee4356c849311a721b212834ea26 (patch)
tree8fefda5b6cbc69985956253a1351e0e1c3e5c898
parentedje: Remove _edje_animators list (diff)
downloadefl-5f207d79e352ee4356c849311a721b212834ea26.tar.gz
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
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_sub.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c
index 7fb1383ad6..eb05f971b0 100644
--- a/src/lib/elementary/efl_ui_focus_manager_sub.c
+++ b/src/lib/elementary/efl_ui_focus_manager_sub.c
@@ -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)
{