summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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 08d9f3b382..86ff6b5c92 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1223,6 +1223,7 @@ again:
}
if (cli_set_port(cli, port) != port) {
+ cli_shutdown(cli);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -1235,6 +1236,7 @@ again:
{
DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
nmb_namestr(&called), inet_ntoa(*dest_ip)));
+ cli_shutdown(cli);
return NT_STATUS_UNSUCCESSFUL;
}