summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index c394197ad9..7a417ec6c0 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -321,10 +321,7 @@ static void _cli_shutdown(struct cli_state *cli)
data_blob_free(&cli->secblob);
data_blob_free(&cli->user_session_key);
- if (cli->fd != -1) {
- close(cli->fd);
- }
- cli->fd = -1;
+ cli_state_disconnect(cli);
/*
* Need to free pending first, they remove themselves