From: Andreas Schneider Date: Tue, 14 Oct 2025 09:20:55 +0000 (+0200) Subject: s3:utils: Use a talloc stackframe for diagnose_ntlm_auth() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7d58534352f73c0bae05844fec1118b4104db03;p=thirdparty%2Fsamba.git s3:utils: Use a talloc stackframe for diagnose_ntlm_auth() This way we can use talloc_tos() and don't leak any memory. This will make LeakSanitizer happy. Signed-off-by: Andreas Schneider Reviewed-by: Anoop C S --- diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c index d70c8c45883..00fb25d32bd 100644 --- a/source3/utils/ntlm_auth_diagnostics.c +++ b/source3/utils/ntlm_auth_diagnostics.c @@ -718,6 +718,7 @@ static const struct ntlm_tests { bool diagnose_ntlm_auth(bool lanman_support_expected) { + TALLOC_CTX *frame = talloc_stackframe(); unsigned int i; bool pass = True; @@ -737,6 +738,8 @@ bool diagnose_ntlm_auth(bool lanman_support_expected) } } + TALLOC_FREE(frame); + return pass; }