From 1f4f6a4305cc2d5d0b05bd8d1c77b589803093ef Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 14 Apr 2021 20:37:39 +0200 Subject: [PATCH] auth3: Remove unnecessary talloc_unlink() calls The structures we unlinked have been talloc_reference()ed in gensec and thus don't need the second talloc parent anymore. But this talloc_unlink isn't necessary because tmp_ctx is free()ed a few lines down. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/auth/auth_generic.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c index 4dc2beafa7c..aabb2d1a999 100644 --- a/source3/auth/auth_generic.c +++ b/source3/auth/auth_generic.c @@ -362,11 +362,6 @@ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx, } gensec_set_credentials(gensec_security, server_credentials); - - talloc_unlink(tmp_ctx, lp_ctx); - talloc_unlink(tmp_ctx, server_credentials); - talloc_unlink(tmp_ctx, gensec_settings); - talloc_unlink(tmp_ctx, auth4_context); } nt_status = gensec_set_remote_address(gensec_security, -- 2.34.1