summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_echo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient/cmd_echo.c')
-rw-r--r--source3/rpcclient/cmd_echo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/rpcclient/cmd_echo.c b/source3/rpcclient/cmd_echo.c
index 727dfd4df2..b8058fa28a 100644
--- a/source3/rpcclient/cmd_echo.c
+++ b/source3/rpcclient/cmd_echo.c
@@ -61,12 +61,11 @@ static NTSTATUS cmd_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
size = atoi(argv[1]);
in_data = (uint8 *)SMB_MALLOC(size);
- out_data = (uint8 *)SMB_MALLOC(size);
for (i = 0; i < size; i++)
in_data[i] = i & 0xff;
- result = rpccli_echo_EchoData(cli, mem_ctx, size, in_data, out_data);
+ result = rpccli_echo_EchoData(cli, mem_ctx, size, in_data, &out_data);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -81,7 +80,7 @@ static NTSTATUS cmd_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
done:
SAFE_FREE(in_data);
- SAFE_FREE(out_data);
+ TALLOC_FREE(out_data);
return result;
}
@@ -100,11 +99,8 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
}
size = atoi(argv[1]);
- if (!(out_data = (uint8 *)SMB_MALLOC(size))) {
- return NT_STATUS_NO_MEMORY;
- }
- result = rpccli_echo_SourceData(cli, mem_ctx, size, out_data);
+ result = rpccli_echo_SourceData(cli, mem_ctx, size, &out_data);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -118,7 +114,7 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
}
done:
- SAFE_FREE(out_data);
+ TALLOC_FREE(out_data);
return result;
}