[Sheepdog] [PATCH 2/4] collie: fix a socket discriptor leak

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Feb 11 18:17:08 CET 2010


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




More information about the sheepdog mailing list