Remove an unused talloc context.
authorJeremy Allison <jra@samba.org>
Fri, 17 Jul 2009 01:12:17 +0000 (18:12 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 17 Jul 2009 01:12:17 +0000 (18:12 -0700)
Jeremy.

source3/auth/auth.c

index fd4c50375258875052c5046e792de58c2c500d51..ce8722a1b48d5cd0e88399d750ffcdbb11cdedcd 100644 (file)
@@ -82,7 +82,6 @@ static void get_ntlm_challenge(struct auth_context *auth_context,
        DATA_BLOB challenge = data_blob_null;
        const char *challenge_set_by = NULL;
        auth_methods *auth_method;
-       TALLOC_CTX *mem_ctx;
 
        if (auth_context->challenge.length) {
                DEBUG(5, ("get_ntlm_challenge (auth subsystem): returning previous challenge by module %s (normal)\n", 
@@ -106,12 +105,8 @@ static void get_ntlm_challenge(struct auth_context *auth_context,
                        continue;
                }
 
-               mem_ctx = talloc_init("auth_get_challenge for module %s", auth_method->name);
-               if (!mem_ctx) {
-                       smb_panic("talloc_init() failed!");
-               }
-
-               challenge = auth_method->get_chal(auth_context, &auth_method->private_data, mem_ctx);
+               challenge = auth_method->get_chal(auth_context, &auth_method->private_data,
+                                       auth_context->mem_ctx);
                if (!challenge.length) {
                        DEBUG(3, ("auth_get_challenge: getting challenge from authentication method %s FAILED.\n", 
                                  auth_method->name));
@@ -121,7 +116,6 @@ static void get_ntlm_challenge(struct auth_context *auth_context,
                        challenge_set_by = auth_method->name;
                        auth_context->challenge_set_method = auth_method;
                }
-               talloc_destroy(mem_ctx);
        }
 
        if (!challenge_set_by) {