reqs: fix CID 1130970 - 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 client fd. Found by coverity. Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
a244c1d4aa
commit
2004abc1e3
@ -1119,7 +1119,13 @@ static void relay_connection (struct conn_s *connptr)
|
|||||||
int maxfd = max (connptr->client_fd, connptr->server_fd) + 1;
|
int maxfd = max (connptr->client_fd, connptr->server_fd) + 1;
|
||||||
ssize_t bytes_received;
|
ssize_t bytes_received;
|
||||||
|
|
||||||
socket_nonblocking (connptr->client_fd);
|
ret = socket_nonblocking (connptr->client_fd);
|
||||||
|
if (ret != 0) {
|
||||||
|
log_message(LOG_ERR, "Failed to set the client socket "
|
||||||
|
"to non-blocking: %s", strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
socket_nonblocking (connptr->server_fd);
|
socket_nonblocking (connptr->server_fd);
|
||||||
|
|
||||||
last_access = time (NULL);
|
last_access = time (NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user