diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-09-20 14:03:29 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-09-20 14:03:29 +0200 |
commit | 566e56dbf1984511c420df6ceb39aa2915e2d37b (patch) | |
tree | ddef6cec2a00d77241d32a86eeb2e77e25417b50 | |
parent | added Readme and updated manpage (diff) |
fixed memory erree due to deactivated command sock
-rw-r--r-- | src/dropnroll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dropnroll.c b/src/dropnroll.c index b70bbc5..24b22af 100644 --- a/src/dropnroll.c +++ b/src/dropnroll.c @@ -426,7 +426,7 @@ int main_loop(int cmd_listen_fd, int inotify_fd, options_t* opt) break; } - if(FD_ISSET(cmd_listen_fd, &tmpfds)) { + if(cmd_listen_fd > 0 && FD_ISSET(cmd_listen_fd, &tmpfds)) { int new_fd = accept(cmd_listen_fd, NULL, NULL); if(new_fd < 0) { log_printf(ERROR, "accept returned with error: %s", strerror(errno)); |