summaryrefslogtreecommitdiffhomepage
path: root/src/reqs.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-11-22 17:34:20 +0100
committerMichael Adam <obnox@samba.org>2013-11-22 17:35:59 +0100
commit68bd0b61b56c5bbf8c2687c3d46edc35f64679af (patch)
tree498e7e65b2a8b654ede9fe85a3c081ba5e7e103b /src/reqs.c
parent2004abc1e33f5c59365f7494f3a288b4dc8beb62 (diff)
reqs: fix CID 1130969 - unchecked return code from library
Effectively, the return code of fcntl was not checked by not checking the return code of socket_nonblocking() for the server fd. Found by coverity. Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'src/reqs.c')
-rw-r--r--src/reqs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/reqs.c b/src/reqs.c
index 00e20aa..37f87d5 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -1126,7 +1126,12 @@ static void relay_connection (struct conn_s *connptr)
return;
}
- socket_nonblocking (connptr->server_fd);
+ ret = socket_nonblocking (connptr->server_fd);
+ if (ret != 0) {
+ log_message(LOG_ERR, "Failed to set the server socket "
+ "to non-blocking: %s", strerror(errno));
+ return;
+ }
last_access = time (NULL);