Don't pass negative values to close:

ecore_main_fd_handler_fd_get can return -1, so check return value
before passing to close().

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-08-05 11:36:24 +01:00
parent cc0bbacb89
commit 65fc207951
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ ecore_file_monitor_backend_shutdown(void)
{
fd = ecore_main_fd_handler_fd_get(_fdh);
ecore_main_fd_handler_del(_fdh);
close(fd);
if (fd > -1)
close(fd);
}
_inotify_fd_pid = -1;
return 1;