From d44ad5687990fef1ffb9dca845103509188f15a3 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 30 Jan 2006 17:47:24 +0000 Subject: r13232: defensive programming in an attempt to prevent crashes due to a PDC rebooting (This used to be commit 994794383361cfe5d58098ae494489fb0164e1df) --- source3/nsswitch/winbindd_cm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 6ac2520f44..2ac984176c 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -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)) { -- cgit