From 5bd4af13023bd645e1bcd1fde826d286382b33e5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 6 Sep 2003 19:49:59 +0000 Subject: fix bug 382: make sure to free and reset the cli_state pointer after flushing connections in winbindd_pam_auth[_crap]() (This used to be commit 60c8796edd84249db5419329a0fea4bbc7f9bb98) --- source3/nsswitch/winbindd_pam.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index a89c7ca065..79b8c1d92d 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -127,6 +127,9 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) do { ZERO_STRUCT(info3); ZERO_STRUCT(ret_creds); + + if ( cli ) + SAFE_FREE(cli); /* Don't shut this down - it belongs to the connection cache code */ result = cm_get_netlogon_cli(contact_domain, trust_passwd, @@ -301,6 +304,9 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ZERO_STRUCT(info3); ZERO_STRUCT(ret_creds); + if ( cli ) + SAFE_FREE( cli ); + /* Don't shut this down - it belongs to the connection cache code */ result = cm_get_netlogon_cli(contact_domain, trust_passwd, sec_channel_type, False, &cli); -- cgit