Applied Steve Langasek's patch for bug #450.
authorTim Potter <tpot@samba.org>
Tue, 16 Sep 2003 03:54:42 +0000 (03:54 +0000)
committerTim Potter <tpot@samba.org>
Tue, 16 Sep 2003 03:54:42 +0000 (03:54 +0000)
(This used to be commit e3cb0cd0d60d90a76e5f74d5bda702148584ab30)

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);
 }