From be55bbc575ecc0e17bfeac7053050efd4178ead6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Mar 2011 14:56:16 +0100 Subject: s4-smbtorture: remove explicit mem_ctx from torture_netlogon_samba3(). Guenther --- source4/torture/rpc/samba3rpc.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index e1950bd0d1..844527237c 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -1295,7 +1295,6 @@ static bool leave(struct torture_context *tctx, static bool torture_netlogon_samba3(struct torture_context *torture) { - TALLOC_CTX *mem_ctx; NTSTATUS status; bool ret = false; struct smbcli_state *cli; @@ -1311,14 +1310,7 @@ static bool torture_netlogon_samba3(struct torture_context *torture) wks_name = get_myname(torture); } - mem_ctx = talloc_init("torture_netlogon_samba3"); - - if (mem_ctx == NULL) { - torture_comment(torture, "talloc_init failed\n"); - return false; - } - - if (!(anon_creds = cli_credentials_init_anon(mem_ctx))) { + if (!(anon_creds = cli_credentials_init_anon(torture))) { torture_comment(torture, "create_anon_creds failed\n"); goto done; } @@ -1326,7 +1318,7 @@ static bool torture_netlogon_samba3(struct torture_context *torture) lpcfg_smbcli_options(torture->lp_ctx, &options); lpcfg_smbcli_session_options(torture->lp_ctx, &session_options); - status = smbcli_full_connection(mem_ctx, &cli, + status = smbcli_full_connection(torture, &cli, torture_setting_string(torture, "host", NULL), lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, @@ -1341,7 +1333,7 @@ static bool torture_netlogon_samba3(struct torture_context *torture) goto done; } - wks_creds = cli_credentials_init(mem_ctx); + wks_creds = cli_credentials_init(torture); if (wks_creds == NULL) { torture_comment(torture, "cli_credentials_init failed\n"); goto done; @@ -1393,7 +1385,6 @@ static bool torture_netlogon_samba3(struct torture_context *torture) ret = true; done: - talloc_free(mem_ctx); return ret; } -- cgit