diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-24 20:23:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:39 -0500 |
commit | e6b56f9f0c601c740432c7040a737f679c131eb3 (patch) | |
tree | aab8d7e16cf571651222791f9735b1dd4b0a947e /source3 | |
parent | 3a22bdf89ee71a72dc3e84aee6e1d10474b8852b (diff) | |
download | samba-e6b56f9f0c601c740432c7040a737f679c131eb3.tar.gz samba-e6b56f9f0c601c740432c7040a737f679c131eb3.tar.bz2 samba-e6b56f9f0c601c740432c7040a737f679c131eb3.zip |
r19487: Fix coverity # 313
(This used to be commit 0eb5a0f7b8dd26dae489b74e1d2a88188ae9e48d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpcclient/cmd_echo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_echo.c b/source3/rpcclient/cmd_echo.c index 0a69e5a11c..727dfd4df2 100644 --- a/source3/rpcclient/cmd_echo.c +++ b/source3/rpcclient/cmd_echo.c @@ -100,7 +100,9 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli, } size = atoi(argv[1]); - out_data = (uint8 *)SMB_MALLOC(size); + if (!(out_data = (uint8 *)SMB_MALLOC(size))) { + return NT_STATUS_NO_MEMORY; + } result = rpccli_echo_SourceData(cli, mem_ctx, size, out_data); @@ -108,7 +110,7 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli, goto done; for (i = 0; i < size; i++) { - if (out_data && out_data[i] != (i & 0xff)) { + if (out_data[i] != (i & 0xff)) { printf("mismatch at offset %d, %d != %d\n", i, out_data[i], i & 0xff); result = NT_STATUS_UNSUCCESSFUL; |