From 8e8bd2d527711898b02626d7d2f593affe67ca7b Mon Sep 17 00:00:00 2001 From: ruti <> Date: Sun, 28 Apr 2024 17:57:40 +0300 Subject: [PATCH] missed fd closing --- proxy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy.c b/proxy.c index f1e8d5a..b3c64b4 100644 --- a/proxy.c +++ b/proxy.c @@ -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) { @@ -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) {