diff options
author | Jim Meyering <meyering@redhat.com> | 2012-08-22 13:55:54 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-22 10:47:14 -0500 |
commit | a7e47d4bfcbf256fae06891a8599950ff8e1b61b (patch) | |
tree | caa5016c7b679a0f8f91cb3d61f4c8fcf27447e1 /block/sheepdog.c | |
parent | 0d07fe47d4986271a21ed4ff5237275ff55dd93f (diff) | |
download | qemu-a7e47d4bfcbf256fae06891a8599950ff8e1b61b.zip qemu-a7e47d4bfcbf256fae06891a8599950ff8e1b61b.tar.gz qemu-a7e47d4bfcbf256fae06891a8599950ff8e1b61b.tar.bz2 |
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/sheepdog.c')
-rw-r--r-- | block/sheepdog.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c index a04ad99..df4f441 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; } |