summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c2
1 files changed, 2 insertions, 0 deletions
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;
}