mirror of
https://github.com/hufrea/byedpi.git
synced 2024-11-29 19:59:12 +03:00
missed fd closing
This commit is contained in:
parent
c6ee15d748
commit
de98827e57
1 changed files with 2 additions and 0 deletions
2
proxy.c
2
proxy.c
|
@ -330,6 +330,7 @@ int create_conn(struct poolhd *pool,
|
||||||
}
|
}
|
||||||
if (params.protect_path
|
if (params.protect_path
|
||||||
&& protect(sfd, params.protect_path) < 0) {
|
&& protect(sfd, params.protect_path) < 0) {
|
||||||
|
close(sfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (addr.sa.sa_family == AF_INET6) {
|
if (addr.sa.sa_family == AF_INET6) {
|
||||||
|
@ -409,6 +410,7 @@ int udp_associate(struct poolhd *pool,
|
||||||
}
|
}
|
||||||
if (params.protect_path
|
if (params.protect_path
|
||||||
&& protect(ufd, params.protect_path) < 0) {
|
&& protect(ufd, params.protect_path) < 0) {
|
||||||
|
close(ufd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (params.baddr.sin6_family == AF_INET6) {
|
if (params.baddr.sin6_family == AF_INET6) {
|
||||||
|
|
Loading…
Reference in a new issue