From a7e47d4bfcbf256fae06891a8599950ff8e1b61b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 22 Aug 2012 13:55:54 +0200 Subject: [PATCH] sheepdog: don't leak socket file descriptor upon connection failure Signed-off-by: Jim Meyering Signed-off-by: Anthony Liguori --- block/sheepdog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index a04ad99ead..df4f44107b 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -485,6 +485,7 @@ static int connect_to_sdog(const char *addr, const char *port) if (errno == EINTR) { goto reconnect; } + close(fd); break; } -- 2.34.1