diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/trusts_util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c index 4e02b29f92..c18641bc84 100644 --- a/source3/libsmb/trusts_util.c +++ b/source3/libsmb/trusts_util.c @@ -180,9 +180,10 @@ BOOL enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain, done: /* cleanup */ - - cli_nt_session_close( cli ); - cli_shutdown( cli ); + if (cli) { + cli_nt_session_close( cli ); + cli_shutdown( cli ); + } return NT_STATUS_IS_OK(result); } |