summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-08-05 11:36:24 +0100
committerChris Michael <cp.michael@samsung.com>2013-08-05 11:36:24 +0100
commit65fc207951425df8e5528bc30833141e493609ea (patch)
treeec5fc9a4205a931ece80c93358396461f0c623e2 /src/lib/ecore_file
parentcc0bbacb8971fdb7ece1b168e53cb2001fd15f47 (diff)
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>
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file_monitor_inotify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c
index 60050e3ca5..18b80074e6 100644
--- a/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -88,7 +88,8 @@ ecore_file_monitor_backend_shutdown(void)
88 { 88 {
89 fd = ecore_main_fd_handler_fd_get(_fdh); 89 fd = ecore_main_fd_handler_fd_get(_fdh);
90 ecore_main_fd_handler_del(_fdh); 90 ecore_main_fd_handler_del(_fdh);
91 close(fd); 91 if (fd > -1)
92 close(fd);
92 } 93 }
93 _inotify_fd_pid = -1; 94 _inotify_fd_pid = -1;
94 return 1; 95 return 1;