svn commit: samba r11267 - in branches/SAMBA_4_0/source/winbind: .

vlendec at samba.org vlendec at samba.org
Sun Oct 23 17:22:00 GMT 2005


Author: vlendec
Date: 2005-10-23 17:22:00 +0000 (Sun, 23 Oct 2005)
New Revision: 11267

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11267

Log:
Fix a memleak and an uninitialized variable. Andrew Bartlett, this was the one
I sent to you. Sorry for bothering you.

Volker

Modified:
   branches/SAMBA_4_0/source/winbind/wb_pam_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/winbind/wb_pam_auth.c
===================================================================
--- branches/SAMBA_4_0/source/winbind/wb_pam_auth.c	2005-10-23 16:29:02 UTC (rev 11266)
+++ branches/SAMBA_4_0/source/winbind/wb_pam_auth.c	2005-10-23 17:22:00 UTC (rev 11267)
@@ -129,6 +129,8 @@
 		state, "\\\\%s", dcerpc_server_name(domain->netlogon_pipe));
 	if (state->r.in.server_name == NULL) return NULL;
 
+	ZERO_STRUCT(state->auth2);
+
 	state->r.in.workstation =
 		cli_credentials_get_workstation(domain->schannel_creds);
 	state->r.in.credential = &state->auth;
@@ -208,17 +210,16 @@
 				   struct netr_UserSessionKey *user_session_key,
 				   struct netr_LMSessionKey *lm_key)
 {
+	struct pam_auth_crap_state *state =
+		talloc_get_type(c->private_data, struct pam_auth_crap_state);
 	NTSTATUS status = composite_wait(c);
 	if (NT_STATUS_IS_OK(status)) {
-		struct pam_auth_crap_state *state =
-			talloc_get_type(c->private_data,
-					struct pam_auth_crap_state);
 		info3->length = state->info3.length;
 		info3->data = talloc_steal(mem_ctx, state->info3.data);
 		*user_session_key = state->user_session_key;
 		*lm_key = state->lm_key;
 	}
-	talloc_free(c);
+	talloc_free(state);
 	return status;
 }
 



More information about the samba-cvs mailing list