mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-30 21:12:15 -05:00
Merge pull request #14 from belobrov-andrey/fd_leak_fix
Fixed possible file descriptor leak.
This commit is contained in:
commit
27567c4804
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