summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_use.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client/cli_use.c')
-rw-r--r--source3/rpc_client/cli_use.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c
index 10997f028f..43f8ec8717 100644
--- a/source3/rpc_client/cli_use.c
+++ b/source3/rpc_client/cli_use.c
@@ -48,7 +48,8 @@ static void cli_use_free(struct cli_use *cli)
{
if (cli->cli->initialised)
{
- cli_ulogoff(cli->cli);
+ if (cli->cli->fd != -1)
+ cli_ulogoff(cli->cli);
cli_shutdown(cli->cli);
}
free(cli->cli);