summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-09-20 14:03:29 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-09-20 14:03:29 +0200
commit566e56dbf1984511c420df6ceb39aa2915e2d37b (patch)
treeddef6cec2a00d77241d32a86eeb2e77e25417b50
parentadded Readme and updated manpage (diff)
fixed memory erree due to deactivated command sock
-rw-r--r--src/dropnroll.c2
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));