From 35f158e283fd4efd92b3c6625ce54b413eb20b31 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 6 Jan 2010 12:32:51 +0100 Subject: [PATCH] s3:auth:check_sam_security: null out sampass after it has been stolen. So that a later talloc_free would not harm. I could have used talloc_move instead of talloc steal in make_server_info_sam(), but this would have required a change of the signature. Michael (cherry picked from commit 1bb4a2ca3a1e11b395b3b819e468ecac67e16d64) --- source3/auth/auth_sam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index add74f611a5..3573de13758 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -402,6 +402,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context, become_root(); nt_status = make_server_info_sam(server_info, sampass); unbecome_root(); + sampass = NULL; if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0,("check_sam_security: make_server_info_sam() failed with '%s'\n", nt_errstr(nt_status))); -- 2.11.4.GIT