From c306aa08eeedb4b35ea3c67cf94442c16ea3c2d9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 29 Oct 2025 15:11:37 +0100 Subject: [PATCH] s3:client: Use a long living memory context for cli_cm_open() This will fix memory leaks with a later commit. Signed-off-by: Andreas Schneider Reviewed-by: Anoop C S --- source3/client/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/client/client.c b/source3/client/client.c index 18a89c8a045..1d3656aab34 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -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, -- 2.47.3