Merge from 3.0:
authorTim Potter <tpot@samba.org>
Fri, 19 Sep 2003 06:22:54 +0000 (06:22 +0000)
committerTim Potter <tpot@samba.org>
Fri, 19 Sep 2003 06:22:54 +0000 (06:22 +0000)
>Applied Steve Langasek's patch for bug #450.
(This used to be commit 50ae61b674550082e30f7156f2a9129b7abebb14)

source3/libsmb/trusts_util.c

index 4e02b29f92c2ab3d77eb7890fa1d5fd7ae224be9..c18641bc8456dbc7d122196028f8c76b524b8f46 100644 (file)
@@ -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);
 }