Fix a segfault in auth/auth_domain.c error cases.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 14 Jan 2002 21:52:25 +0000 (21:52 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 14 Jan 2002 21:52:25 +0000 (21:52 +0000)
This occured when the attempt to contact the PDC failed.  The connection code
has already shut down the connection, and 'free'ed the cli or has never
initialised it in the first place.

Andrew Bartlett
(This used to be commit 37ce7630434c1afae5164c64438f428dd8e1b731)

source3/auth/auth_domain.c

index 6dcf3119ea8000bfa54ebf4acaf0579b644a606e..2b5104bf923521d712046b6df70ae11e681a9e33 100644 (file)
@@ -241,7 +241,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
 {
        fstring remote_machine;
        NET_USER_INFO_3 info3;
-       struct cli_state *cli;
+       struct cli_state *cli = NULL;
        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
        struct passwd *pass;
 
@@ -264,7 +264,6 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("domain_client_validate: Domain password server not available.\n"));
-               cli_shutdown(cli);
                return nt_status;
        }