From b895f1fb018405a5149c1c2a55e282bc88e6f8d3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 21 Nov 2011 18:03:07 +0100 Subject: s3:libsmb: close fd on error in cli_connect_nb() metze --- source3/libsmb/cliconnect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index a2a65b5b5c..c2fa9239ef 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -3060,6 +3060,8 @@ NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss cli = cli_state_create(NULL, fd, desthost, NULL, signing_state, flags); if (cli == NULL) { + close(fd); + fd = -1; goto fail; } -- cgit