summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl/efl_wl.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-07-12 12:00:52 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-12 11:59:20 -0400
commitc6f41d8e10515f214e6a27237e927280e4bb3957 (patch)
tree92d3cc705154a201928084c6fb0e021c238b28b5 /src/lib/efl_wl/efl_wl.c
parent8c2afaf251d5b65c82723be22ba2c23913343bef (diff)
efl-wl: check return of ecore_main_fd_handler_fd_get
CID 1377541, 1377546, 1377519, 1377529, 1377543
Diffstat (limited to 'src/lib/efl_wl/efl_wl.c')
-rw-r--r--src/lib/efl_wl/efl_wl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 99509deda5..a119b9c735 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -395,8 +395,11 @@ tiler_new(void)
395static inline void 395static inline void
396fdh_del(Ecore_Fd_Handler *fdh) 396fdh_del(Ecore_Fd_Handler *fdh)
397{ 397{
398 int fd;
398 if (!fdh) return; 399 if (!fdh) return;
399 close(ecore_main_fd_handler_fd_get(fdh)); 400 fd = ecore_main_fd_handler_fd_get(fdh);
401 if (fd >= 0)
402 close(fd);
400 ecore_main_fd_handler_del(fdh); 403 ecore_main_fd_handler_del(fdh);
401} 404}
402 405
@@ -1004,8 +1007,11 @@ data_device_selection_read(void *d, Ecore_Fd_Handler *fdh)
1004 do 1007 do
1005 { 1008 {
1006 unsigned char buf[2048]; 1009 unsigned char buf[2048];
1010 int fd;
1007 1011
1008 len = read(ecore_main_fd_handler_fd_get(fdh), buf, sizeof(buf)); 1012 fd = ecore_main_fd_handler_fd_get(fdh);
1013 if (fd < 0) break;
1014 len = read(fd, buf, sizeof(buf));
1009 if (len > 0) 1015 if (len > 0)
1010 { 1016 {
1011 if (!ds->reader_data) 1017 if (!ds->reader_data)