summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-09-20 12:03:29 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-09-20 12:03:29 (GMT)
commit566e56dbf1984511c420df6ceb39aa2915e2d37b (patch)
treeddef6cec2a00d77241d32a86eeb2e77e25417b50
parent18372ecc6e3c5bdf7878cdb2dfa065f6253da2b8 (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));