From 61861e4b7d37d5b483360c0e9faa3dd3a1d0e9f6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 25 Sep 2010 14:50:46 -0700 Subject: s3: Lift talloc_autofree_context() from make_auth_context() --- source3/auth/auth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/auth/auth.c b/source3/auth/auth.c index cabff53180..a22c223e13 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -343,11 +343,12 @@ static int auth_context_destructor(void *ptr) Make a auth_info struct ***************************************************************************/ -static NTSTATUS make_auth_context(struct auth_context **auth_context) +static NTSTATUS make_auth_context(TALLOC_CTX *mem_ctx, + struct auth_context **auth_context) { struct auth_context *ctx; - ctx = talloc_zero(talloc_autofree_context(), struct auth_context); + ctx = talloc_zero(mem_ctx, struct auth_context); if (!ctx) { DEBUG(0,("make_auth_context: talloc failed!\n")); return NT_STATUS_NO_MEMORY; @@ -431,8 +432,11 @@ static NTSTATUS make_auth_context_text_list(struct auth_context **auth_context, return NT_STATUS_UNSUCCESSFUL; } - if (!NT_STATUS_IS_OK(nt_status = make_auth_context(auth_context))) + nt_status = make_auth_context(talloc_autofree_context(), auth_context); + + if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; + } for (;*text_list; text_list++) { if (load_auth_module(*auth_context, *text_list, &t)) { -- cgit