summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJim Meyering2012-08-22 13:55:54 +0200
committerAnthony Liguori2012-08-22 17:47:14 +0200
commita7e47d4bfcbf256fae06891a8599950ff8e1b61b (patch)
treecaa5016c7b679a0f8f91cb3d61f4c8fcf27447e1 /block
parentlinux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure (diff)
downloadqemu-a7e47d4bfcbf256fae06891a8599950ff8e1b61b.tar.gz
qemu-a7e47d4bfcbf256fae06891a8599950ff8e1b61b.tar.xz
qemu-a7e47d4bfcbf256fae06891a8599950ff8e1b61b.zip
sheepdog: don't leak socket file descriptor upon connection failure
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block')
-rw-r--r--block/sheepdog.c1
1 files changed, 1 insertions, 0 deletions
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;
}