]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: Pass down a talloc context to do_message_op()
authorAndreas Schneider <asn@samba.org>
Wed, 29 Oct 2025 10:00:18 +0000 (11:00 +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 ac97577da04d702477fb7249cf223627effb0dec..873d192cd3819182e9891b381d98010e5683a61d 100644 (file)
@@ -6404,7 +6404,7 @@ static int do_tar_op(const char *base_directory)
  Handle a message operation.
 ****************************************************************************/
 
-static int do_message_op(struct cli_credentials *creds)
+static int do_message_op(TALLOC_CTX *mem_ctx, struct cli_credentials *creds)
 {
        NTSTATUS status;
        struct smb_transports ts =
@@ -6415,7 +6415,7 @@ static int do_message_op(struct cli_credentials *creds)
                return 1;
        }
 
-       status = cli_connect_nb(talloc_tos(),
+       status = cli_connect_nb(mem_ctx,
                                desthost, have_ip ? &dest_ss : NULL,
                                &ts,
                                name_type,
@@ -6804,7 +6804,7 @@ int main(int argc,char *argv[])
 
                rc = do_host_query(frame, lp_ctx, qhost);
        } else if (message) {
-               rc = do_message_op(creds);
+               rc = do_message_op(frame, creds);
        } else if (process(frame, base_directory)) {
                rc = 1;
        }