derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5f207d79e352ee4356c849311a721b212834ea26

commit 5f207d79e352ee4356c849311a721b212834ea26
Author: Derek Foreman <derek.foreman.sams...@gmail.com>
Date:   Mon Jan 14 19:01:05 2019 -0600

    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.sams...@gmail.com>
    Reviewed-by: Marcel Hollerbach <marcel-hollerb...@t-online.de>
    Differential Revision: https://phab.enlightenment.org/D7622
---
 src/lib/elementary/efl_ui_focus_manager_sub.c | 6 ++----
 1 file 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)
      {

-- 


Reply via email to