s3: Lift talloc_autofree_context() from make_auth_context_text_list()
authorVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 21:51:45 +0000 (14:51 -0700)
committerVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 23:12:37 +0000 (01:12 +0200)
source3/auth/auth.c

index a22c223e13ba068218d069fb49bf11c389bcb81b..8a3e3497be19c00512f71d179cb87aa82cc2053a 100644 (file)
@@ -421,7 +421,9 @@ bool load_auth_module(struct auth_context *auth_context,
  Make a auth_info struct for the auth subsystem
 ***************************************************************************/
 
-static NTSTATUS make_auth_context_text_list(struct auth_context **auth_context, char **text_list) 
+static NTSTATUS make_auth_context_text_list(TALLOC_CTX *mem_ctx,
+                                           struct auth_context **auth_context,
+                                           char **text_list)
 {
        auth_methods *list = NULL;
        auth_methods *t = NULL;
@@ -432,7 +434,7 @@ static NTSTATUS make_auth_context_text_list(struct auth_context **auth_context,
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       nt_status = make_auth_context(talloc_autofree_context(), auth_context);
+       nt_status = make_auth_context(mem_ctx, auth_context);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
@@ -524,7 +526,8 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
                DEBUG(5,("Using specified auth order\n"));
        }
 
-       nt_status = make_auth_context_text_list(auth_context,
+       nt_status = make_auth_context_text_list(talloc_autofree_context(),
+                                               auth_context,
                                                auth_method_list);
 
        TALLOC_FREE(auth_method_list);