]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: Use a long living memory context for cli_cm_open()
authorAndreas Schneider <asn@samba.org>
Wed, 29 Oct 2025 14:11:37 +0000 (15:11 +0100)
committerAnoop C S <anoopcs@samba.org>
Thu, 6 Nov 2025 08:56:31 +0000 (08:56 +0000)
This will fix memory leaks with a later commit.

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

index 18a89c8a0452fa45d5f3d383c626611075eac6be..1d3656aab34656ca2fe23528501063f28213e388 100644 (file)
@@ -6246,7 +6246,7 @@ static int process(TALLOC_CTX *mem_ctx, const char *base_directory)
        struct cli_credentials *creds = samba_cmdline_get_creds();
        struct smb_transports ts = smbsock_transports_from_port(port);
 
-       status = cli_cm_open(talloc_tos(), NULL,
+       status = cli_cm_open(mem_ctx, NULL,
                             desthost,
                             service,
                             creds,