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
This commit is contained in:
Christopher Michael 2020-03-30 14:34:41 -04:00
parent dc7283eb14
commit 9fbe26998b
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}