summaryrefslogtreecommitdiffstats
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_echo.c12
-rw-r--r--source3/rpcclient/cmd_srvsvc.c10
2 files changed, 10 insertions, 12 deletions
diff --git a/source3/rpcclient/cmd_echo.c b/source3/rpcclient/cmd_echo.c
index 727dfd4df20..b8058fa28a0 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;
}
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 9f6e606c3a1..1d1c2f78528 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -249,6 +249,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct rpc_pipe_client *cli,
union srvsvc_NetShareCtr ctr;
NTSTATUS result;
uint32 hnd;
+ uint32 *phnd = &hnd;
uint32 preferred_len = 0xffffffff, i;
uint32 numentries;
@@ -288,7 +289,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct rpc_pipe_client *cli,
result = rpccli_srvsvc_NetShareEnum(
cli, mem_ctx, cli->cli->desthost, &info_level, &ctr, preferred_len, &numentries,
- &hnd);
+ &phnd);
if (!NT_STATUS_IS_OK(result) || !numentries)
goto done;
@@ -366,7 +367,7 @@ static NTSTATUS cmd_srvsvc_net_share_set_info(struct rpc_pipe_client *cli,
uint32 info_level = 502;
union srvsvc_NetShareInfo info_get;
NTSTATUS result;
- uint32 parm_error;
+ uint32 *parm_error = NULL;
if (argc > 3) {
printf("Usage: %s [sharename] [comment]\n", argv[0]);
@@ -401,7 +402,7 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct rpc_pipe_client *cli,
{
fstring srv_name_slash;
NTSTATUS result;
- struct srvsvc_NetRemoteTODInfo tod;
+ struct srvsvc_NetRemoteTODInfo *tod;
if (argc > 1) {
printf("Usage: %s\n", argv[0]);
@@ -427,6 +428,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
union srvsvc_NetFileCtr ctr;
NTSTATUS result;
uint32 hnd;
+ uint32 *phnd = &hnd;
uint32 preferred_len = 0xffff;
uint32 numentries;
@@ -443,7 +445,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
ZERO_STRUCT(ctr);
result = rpccli_srvsvc_NetFileEnum(
- cli, mem_ctx, NULL, NULL, NULL, &info_level, &ctr, preferred_len, &numentries, &hnd);
+ cli, mem_ctx, NULL, NULL, NULL, &info_level, &ctr, preferred_len, &numentries, &phnd);
if (!NT_STATUS_IS_OK(result))
goto done;