devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9fbe26998b42ad55301d012c3d7df2898d6283b8

commit 9fbe26998b42ad55301d012c3d7df2898d6283b8
Author: Christopher Michael <[email protected]>
Date:   Mon Mar 30 14:34:41 2020 -0400

    ecore_evas_wayland: Do not pass negative parameter to close function
    
    Coverity reports that 'fd' here is negative, and close() cannot accept
    a negative parameter, so add a check to make sure 'fd' is not negative
    before passing to close function.
    
    Fixes CID1420318
---
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 2fd027cb14..67ff8931a9 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -2624,7 +2624,7 @@ end:
         ecore_main_fd_handler_del(fd_handler);
         free(slice->slice.mem);
         free(slice);
-        close(fd);
+        if (fd > -1) close(fd);
         return EINA_FALSE;
      }
 }

-- 


Reply via email to