summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient/cmd_test.c')
-rw-r--r--source3/rpcclient/cmd_test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_test.c b/source3/rpcclient/cmd_test.c
index 089d7bcaa3..dd956604cc 100644
--- a/source3/rpcclient/cmd_test.c
+++ b/source3/rpcclient/cmd_test.c
@@ -30,10 +30,12 @@ static NTSTATUS cmd_testme(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
d_printf("testme\n");
- lsa_pipe = cli_rpc_pipe_open_noauth(cli->cli, PI_LSARPC, &status);
+ lsa_pipe = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
+ PI_LSARPC, &status);
if (lsa_pipe == NULL) goto done;
- samr_pipe = cli_rpc_pipe_open_noauth(cli->cli, PI_SAMR, &status);
+ samr_pipe = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
+ PI_SAMR, &status);
if (samr_pipe == NULL) goto done;
status = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, False,
@@ -48,8 +50,8 @@ static NTSTATUS cmd_testme(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
goto done;
done:
- if (lsa_pipe != NULL) cli_rpc_pipe_close(lsa_pipe);
- if (samr_pipe != NULL) cli_rpc_pipe_close(samr_pipe);
+ TALLOC_FREE(lsa_pipe);
+ TALLOC_FREE(samr_pipe);
return status;
}