From 242e3296108f513b286787ac12ea768b9c4ed954 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 25 Sep 2010 15:31:29 -0700 Subject: s3: Lift talloc_autofree_context() from make_auth_context_subsystem() --- source3/auth/auth.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/auth/auth.c') diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 8a3e3497be..4eb0845ba0 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -455,7 +455,8 @@ static NTSTATUS make_auth_context_text_list(TALLOC_CTX *mem_ctx, Make a auth_context struct for the auth subsystem ***************************************************************************/ -NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) +NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx, + struct auth_context **auth_context) { char **auth_method_list = NULL; NTSTATUS nt_status; @@ -526,8 +527,7 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) DEBUG(5,("Using specified auth order\n")); } - nt_status = make_auth_context_text_list(talloc_autofree_context(), - auth_context, + nt_status = make_auth_context_text_list(mem_ctx, auth_context, auth_method_list); TALLOC_FREE(auth_method_list); @@ -541,7 +541,9 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8]) { NTSTATUS nt_status; - if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(auth_context))) { + nt_status = make_auth_context_subsystem(talloc_autofree_context(), + auth_context); + if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } -- cgit