Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> --- lib/net.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/net.c b/lib/net.c index 7bca7b2..f06ae05 100644 --- a/lib/net.c +++ b/lib/net.c @@ -212,6 +212,8 @@ int connect_to(char *name, int port) name, port, strerror(errno)); else goto success; + + close(fd); } fd = -1; success: -- 1.5.6.5 |