Coverity reports that we potentially leak the storage of
'tree_iterator' here because we allocate the space for it, but
potentially juse return due to use of ELM_WIDGET_DATA_GET_OR_RETURN.
To fix this, just move the allocation to after the above macro is
called.
Fixes Coverity CID1399088
@fix
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8314
EAPI Eina_Iterator*
efl_ui_widget_tree_widget_iterator(Efl_Ui_Widget *obj)
{
- Eina_Iterator *tree_iterator = efl_ui_widget_tree_iterator(obj);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, pd, NULL);
+ Eina_Iterator *tree_iterator = efl_ui_widget_tree_iterator(obj);
return eina_iterator_filter_new(tree_iterator, _only_widget, NULL, NULL);
}