]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: Pass down a talloc context to do_tar_op()
authorAndreas Schneider <asn@samba.org>
Wed, 29 Oct 2025 10:03:45 +0000 (11:03 +0100)
committerAnoop C S <anoopcs@samba.org>
Thu, 6 Nov 2025 08:56:31 +0000 (08:56 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/client/client.c

index 873d192cd3819182e9891b381d98010e5683a61d..d8eb662b1b1dc8cef97e41d1cc5abc34c1d14b26 100644 (file)
@@ -6358,7 +6358,7 @@ out:
  Handle a tar operation.
 ****************************************************************************/
 
-static int do_tar_op(const char *base_directory)
+static int do_tar_op(TALLOC_CTX *mem_ctx, const char *base_directory)
 {
        struct tar *tar_ctx = tar_get_ctx();
        int ret = 0;
@@ -6369,7 +6369,7 @@ static int do_tar_op(const char *base_directory)
        if (!cli) {
                NTSTATUS status;
 
-               status = cli_cm_open(talloc_tos(), NULL,
+               status = cli_cm_open(mem_ctx, NULL,
                                     desthost,
                                     service,
                                     creds,
@@ -6783,7 +6783,7 @@ int main(int argc,char *argv[])
        if (tar_to_process(tar_ctx)) {
                if (cmdstr)
                        process_command_string(cmdstr);
-               rc = do_tar_op(base_directory);
+               rc = do_tar_op(frame, base_directory);
        } else if (query_host && *query_host) {
                char *qhost = query_host;
                char *slash;