r13232: defensive programming in an attempt to prevent crashes due to a PDC rebooting
authorGerald Carter <jerry@samba.org>
Mon, 30 Jan 2006 17:47:24 +0000 (17:47 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:06:19 +0000 (11:06 -0500)
(This used to be commit 994794383361cfe5d58098ae494489fb0164e1df)

source3/nsswitch/winbindd_cm.c

index 6ac2520f44d25922f98cbce423e5e13c526c76ea..2ac984176c667a3f95adbb6755786fab225bf583 100644 (file)
@@ -101,8 +101,8 @@ static void cm_get_ipc_userpass(char **username, char **domain, char **password)
 static BOOL get_dc_name_via_netlogon(const struct winbindd_domain *domain,
                                     fstring dcname, struct in_addr *dc_ip)
 {
-       struct winbindd_domain *our_domain;
-       struct rpc_pipe_client *netlogon_pipe;
+       struct winbindd_domain *our_domain = NULL;
+       struct rpc_pipe_client *netlogon_pipe = NULL;
        NTSTATUS result;
        TALLOC_CTX *mem_ctx;
 
@@ -1306,7 +1306,9 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
        uint8  mach_pwd[16];
        uint32  sec_chan_type;
        const char *account_name;
-       struct rpc_pipe_client *netlogon_pipe;
+       struct rpc_pipe_client *netlogon_pipe = NULL;
+
+       *cli = NULL;
 
        result = init_dc_connection(domain);
        if (!NT_STATUS_IS_OK(result)) {