]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: Use a talloc stackframe for diagnose_ntlm_auth()
authorAndreas Schneider <asn@samba.org>
Tue, 14 Oct 2025 09:20:55 +0000 (11:20 +0200)
committerAnoop C S <anoopcs@samba.org>
Thu, 16 Oct 2025 08:32:32 +0000 (08:32 +0000)
This way we can use talloc_tos() and don't leak any memory. This will
make LeakSanitizer happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/utils/ntlm_auth_diagnostics.c

index d70c8c458832e1aaf1c0aa84facf9d8d95f7ebf5..00fb25d32bdb2078e6b052553dd5f9cc82dcac70 100644 (file)
@@ -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;
 }