summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-01-06 12:32:51 +0100
committerMichael Adam <obnox@samba.org>2010-01-07 11:07:56 +0100
commitde4fb80beec59999dd9ce074d4fff0b310fb08da (patch)
tree11e8c2f991e1691bfcb21824c62fb8b94b0c513b /source3
parent36348594505a5e7934d20d3b614f51023ae5740a (diff)
downloadsamba-de4fb80beec59999dd9ce074d4fff0b310fb08da.tar.gz
samba-de4fb80beec59999dd9ce074d4fff0b310fb08da.tar.bz2
samba-de4fb80beec59999dd9ce074d4fff0b310fb08da.zip
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
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_sam.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index add74f611a..3573de1375 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)));