coverity 156864 fuzxy close socket if connect fails
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
4ccc13d3ee
commit
1f8ec7c865
1 changed files with 1 additions and 0 deletions
|
@ -452,6 +452,7 @@ handle_accept(int n)
|
|||
if (connect(sockfd, (struct sockaddr *)&serv_addr4,
|
||||
sizeof(struct sockaddr)) == -1 ||
|
||||
errno == EISCONN) {
|
||||
close(sockfd);
|
||||
lwsl_err("proxied onward connection failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue