summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmbclient.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 2c813a8481..2b0115eaaa 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -596,6 +596,7 @@ SMBCSRV *smbc_server(SMBCCTX *context,
*/
c.port = 445;
if (!cli_connect(&c, server_n, &ip)) {
+ cli_shutdown(&c);
errno = ENETUNREACH;
return NULL;
}