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 | |
parent | 0d07fe47d4986271a21ed4ff5237275ff55dd93f (diff) |
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.c | 1 |
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; } |