summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2020-03-30 14:34:41 -0400
committerChristopher Michael <devilhorns@comcast.net>2020-03-30 14:34:41 -0400
commit9fbe26998b42ad55301d012c3d7df2898d6283b8 (patch)
tree437e21dbe9cd1476e1f1c52683cfbb113a2ce32f /src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
parentdc7283eb143ad38b938def0bf9cc88670d0de1ff (diff)
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
Diffstat (limited to '')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c2
1 files changed, 1 insertions, 1 deletions
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:
2624 ecore_main_fd_handler_del(fd_handler); 2624 ecore_main_fd_handler_del(fd_handler);
2625 free(slice->slice.mem); 2625 free(slice->slice.mem);
2626 free(slice); 2626 free(slice);
2627 close(fd); 2627 if (fd > -1) close(fd);
2628 return EINA_FALSE; 2628 return EINA_FALSE;
2629 } 2629 }
2630} 2630}