Skip to content

Commit

Permalink
missed fd closing
Browse files Browse the repository at this point in the history
  • Loading branch information
ruti committed Apr 28, 2024
1 parent c6ee15d commit de98827
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ int create_conn(struct poolhd *pool,
}
if (params.protect_path
&& protect(sfd, params.protect_path) < 0) {
close(sfd);
return -1;
}
if (addr.sa.sa_family == AF_INET6) {
Expand Down Expand Up @@ -409,6 +410,7 @@ int udp_associate(struct poolhd *pool,
}
if (params.protect_path
&& protect(ufd, params.protect_path) < 0) {
close(ufd);
return -1;
}
if (params.baddr.sin6_family == AF_INET6) {
Expand Down

0 comments on commit de98827

Please sign in to comment.