]> git.proxmox.com Git - qemu.git/commitdiff
sheepdog: don't leak socket file descriptor upon connection failure
authorJim Meyering <meyering@redhat.com>
Wed, 22 Aug 2012 11:55:54 +0000 (13:55 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 22 Aug 2012 15:47:14 +0000 (10:47 -0500)
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/sheepdog.c

index a04ad99ead90b2036e5876f2ea059f5b28e0681e..df4f44107b32f540d26ae3e4763ee440841ef7cf 100644 (file)
@@ -485,6 +485,7 @@ static int connect_to_sdog(const char *addr, const char *port)
             if (errno == EINTR) {
                 goto reconnect;
             }
+            close(fd);
             break;
         }