From 566e56dbf1984511c420df6ceb39aa2915e2d37b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 20 Sep 2015 14:03:29 +0200 Subject: fixed memory erree due to deactivated command sock --- src/dropnroll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v1.2.3