From 33319173416d865321be4763d2a16db5b20fe1a8 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 12 Mar 2019 10:11:21 -0400 Subject: [PATCH] efl_ui_selection_manager: Fix unchecked return value This patch fixes an issue where the return value from ecore_x_init is not checked. If we fail to initialize ecore_x, then we should print out an error and get out. Fixes Coverity CID1399092 @fix Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8312 --- src/lib/elementary/efl_ui_selection_manager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c index 08566e9..be74c25 100644 --- a/src/lib/elementary/efl_ui_selection_manager.c +++ b/src/lib/elementary/efl_ui_selection_manager.c @@ -5250,7 +5250,11 @@ _efl_ui_selection_manager_efl_object_constructor(Eo *obj, Efl_Ui_Selection_Manag } if (init_x) { - ecore_x_init(NULL); + if (!ecore_x_init(NULL)) + { + ERR("Could not initialize Ecore_X"); + return NULL; + } } #endif #ifdef HAVE_ELEMENTARY_WL2 -- 2.7.4