summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-07-03 18:23:45 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-07-03 18:23:45 -0400
commit7496df08aa0397307eade19742373140d52119e5 (patch)
treee0eb5fc3ad724a1bd268834176ffc367cf473bc5
parent5c8ea3a6f3bb539da3fbc022a8fbd407d4792051 (diff)
downloadefl-7496df08aa0397307eade19742373140d52119e5.tar.gz
ecore-wl2: Fix error handling for bad fd
If we end up failing to get the fd from ecore_main_fd_handler_fd_get, then we should just bail out of this function and try again later. Fixes Coverity CID1357213 @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_dnd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 0beac7ab2c..e0863da4ae 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -232,6 +232,8 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh)
fd = ecore_main_fd_handler_fd_get(fdh);
if (fd >= 0)
len = read(fd, buffer, sizeof buffer);
+ else
+ return ECORE_CALLBACK_RENEW;
event = calloc(1, sizeof(Ecore_Wl2_Event_Selection_Data_Ready));
if (!event) return ECORE_CALLBACK_CANCEL;