mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-24 18:12:17 -05:00
Fixed possible file descriptor leak.
This commit is contained in:
parent
9d2deff6ad
commit
ff070a6b46
1
common.c
1
common.c
@ -155,6 +155,7 @@ int connect_addr(struct connection *cnx, int fd_from)
|
|||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
log_message(LOG_ERR, "forward to %s failed:connect: %s\n",
|
log_message(LOG_ERR, "forward to %s failed:connect: %s\n",
|
||||||
cnx->proto->description, strerror(errno));
|
cnx->proto->description, strerror(errno));
|
||||||
|
close(fd);
|
||||||
} else {
|
} else {
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user