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>
This commit is contained in:
Jim Meyering 2012-08-22 13:55:54 +02:00 committed by Anthony Liguori
parent 0d07fe47d4
commit a7e47d4bfc
1 changed files with 1 additions and 0 deletions

View File

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