summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de41631)
raw | patch | inline | side by side (parent: de41631)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 5 Jun 2016 11:53:17 +0000 (13:53 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 5 Jun 2016 11:53:17 +0000 (13:53 +0200) |
src/daemon/common.c | patch | blob | history |
diff --git a/src/daemon/common.c b/src/daemon/common.c
index f82efe3347d0cf292a8177120d6d2c3ea1d88242..4c271d347d90e9d3bc60a50b5b528939eea2b235 100644 (file)
--- a/src/daemon/common.c
+++ b/src/daemon/common.c
ptr = (const char *) buf;
nleft = count;
+ if (fd < 0)
+ return (-1);
+
/* checking for closed peer connection */
pfd.fd = fd;
pfd.events = POLLIN | POLLHUP;