From 57adf37303bac3e2cfdd5e25fddd4fe39ae284c9 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 2 Mar 2020 16:40:38 +0100 Subject: [PATCH] tests_: elementary: free memory in error path Make sure we free the iterator here as well. CID: 1409658 Signed-off-by: Stefan Schmidt Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11441 --- src/tests/elementary/spec/efl_test_basics.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/elementary/spec/efl_test_basics.c b/src/tests/elementary/spec/efl_test_basics.c index 2774b2ae8f..603c094ce0 100644 --- a/src/tests/elementary/spec/efl_test_basics.c +++ b/src/tests/elementary/spec/efl_test_basics.c @@ -67,7 +67,12 @@ EFL_START_TEST(no_leaking_canvas_object) Eina_Iterator *iter = eo_objects_iterator_new(); Eo *obj; - if (efl_isa(widget, EFL_UI_FLIP_CLASS)) return; //FIXME Flip needs more work for this. However, flip should be redone as a spotlight manager, When this is done, we can add these classes to the check here. + if (efl_isa(widget, EFL_UI_FLIP_CLASS)) + { + //FIXME Flip needs more work for this. However, flip should be redone as a spotlight manager, When this is done, we can add these classes to the check here. + eina_iterator_free(iter); + return; + } EINA_ITERATOR_FOREACH(iter, obj) {