coverity 156863 fuzxy handle cant get socket
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
e34d4b4b35
commit
4ccc13d3ee
1 changed files with 4 additions and 0 deletions
|
@ -444,6 +444,10 @@ handle_accept(int n)
|
|||
s->address, s->port);
|
||||
/* we need to open the associated onward connection */
|
||||
sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sockfd < 0) {
|
||||
lwsl_err("Could not get socket\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (connect(sockfd, (struct sockaddr *)&serv_addr4,
|
||||
sizeof(struct sockaddr)) == -1 ||
|
||||
|
|
Loading…
Add table
Reference in a new issue