summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--log_manager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/log_manager.cpp b/log_manager.cpp
index f808e4b..71858f6 100644
--- a/log_manager.cpp
+++ b/log_manager.cpp
@@ -438,9 +438,12 @@ void Manager::journalSync()
;
}
- if ((fd != -1) && (wd != -1))
+ if (fd != -1)
{
- inotify_rm_watch(fd, wd);
+ if (wd != -1)
+ {
+ inotify_rm_watch(fd, wd);
+ }
close(fd);
}
OpenPOWER on IntegriCloud