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>
(cherry picked from commit 68bd0b61b5)
			
			
This commit is contained in:
		
							parent
							
								
									5a5ae8bfe1
								
							
						
					
					
						commit
						903c9eeb1c
					
				@ -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);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user