aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-16 17:49:43 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-16 17:57:20 +0200
commit57c7e59850cedc496800390ce022a32b428d7154 (patch)
treecd8b005c6750aa93cde1bd6d6a2367cc7dc66e3f
parentdocs: Update Efl.Ui.Box_Stack docs (diff)
downloadefl-57c7e59850cedc496800390ce022a32b428d7154.tar.gz
efl_ui_focus_manager_calc: fix resource leaks
this fixes CIDs 1396965 & 1396984
-rw-r--r--src/lib/elementary/efl_ui_focus_graph.c1
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/elementary/efl_ui_focus_graph.c b/src/lib/elementary/efl_ui_focus_graph.c
index efdd3ebff2..ef04c555e7 100644
--- a/src/lib/elementary/efl_ui_focus_graph.c
+++ b/src/lib/elementary/efl_ui_focus_graph.c
@@ -223,4 +223,5 @@ efl_ui_focus_graph_calc(Efl_Ui_Focus_Graph_Context *ctx, Eina_Iterator *nodes, O
cont:
continue;
}
+ eina_iterator_free(nodes);
}
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index fa26b515e0..efb67fcabf 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -1473,13 +1473,14 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U
Node_Type node_type;
Eina_Array *old_chain = eina_array_new(5), *chain = eina_array_new(5);
- EINA_SAFETY_ON_NULL_RETURN(focus);
+ EINA_SAFETY_ON_NULL_GOTO(focus, end);
_current_focused_parent_to_array(obj, pd, old_chain);
//check if node is part of this manager object
node = node_get(obj, pd, focus);
- if (!node) return;
+ if (!node)
+ goto end;
if (node->type == NODE_TYPE_ONLY_LOGICAL && !node->redirect_manager)
{
@@ -1500,7 +1501,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U
else
{
ERR("Could not fetch a node located at %p", node->focusable);
- return;
+ goto end;
}
}