summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-23 17:22:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:10 -0500
commit28a3bc645b49ea6e997b3576ba7a8ba55e7caa9c (patch)
tree57c86fae25ffafcb6b0a6fff5f526d2ffb8d982b /source4
parent2d1aa2954b8061c1fccb8fb9f7b8bd64a21e8210 (diff)
downloadsamba-28a3bc645b49ea6e997b3576ba7a8ba55e7caa9c.tar.gz
samba-28a3bc645b49ea6e997b3576ba7a8ba55e7caa9c.tar.bz2
samba-28a3bc645b49ea6e997b3576ba7a8ba55e7caa9c.zip
r11267: Fix a memleak and an uninitialized variable. Andrew Bartlett, this was the one
I sent to you. Sorry for bothering you. Volker (This used to be commit 3a9f2291ae6e96a715f463899957c6c598fc7627)
Diffstat (limited to 'source4')
-rw-r--r--source4/winbind/wb_pam_auth.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c
index b6864a39cc..c3a9d1fec3 100644
--- a/source4/winbind/wb_pam_auth.c
+++ b/source4/winbind/wb_pam_auth.c
@@ -129,6 +129,8 @@ static struct composite_context *crap_samlogon_send_req(struct wbsrv_domain *dom
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 @@ NTSTATUS wb_cmd_pam_auth_crap_recv(struct composite_context *c,
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;
}