mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-13 14:43:09 +00:00
better wary coding
This commit is contained in:
parent
5519e2be8e
commit
e159bf5f31
@ -319,7 +319,13 @@ inotify_ready(lua_State *L, struct observance *observance)
|
||||
static void
|
||||
inotify_tidy(struct observance *observance)
|
||||
{
|
||||
close(observance->fd);
|
||||
if (observance->fd != inotify_fd) {
|
||||
logstring("Error",
|
||||
"internal fail, inotify_ready on non-inotify file descriptor.");
|
||||
exit(-1); // ERRNO
|
||||
}
|
||||
close(inotify_fd);
|
||||
inotify_fd = -1;
|
||||
free(readbuf);
|
||||
readbuf = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user