diff options
author | Volker Lendecke <vl@samba.org> | 2008-05-05 11:15:59 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-05-05 11:17:19 +0200 |
commit | 2c00ff5407d5b126c8d38ceb2bcc8626ee7c0c5d (patch) | |
tree | f9d22eeec305b1b34c4b89e87d38bb443e7f4e13 /source3/rpc_client | |
parent | b430b382202858a6c52c1cacbb91910b2dd7e16c (diff) | |
download | samba-2c00ff5407d5b126c8d38ceb2bcc8626ee7c0c5d.tar.gz samba-2c00ff5407d5b126c8d38ceb2bcc8626ee7c0c5d.tar.bz2 samba-2c00ff5407d5b126c8d38ceb2bcc8626ee7c0c5d.zip |
Fix two uninitialized variable warnings
(This used to be commit 48fd7b3635137e2fe77c0b0413965869194421ff)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 7e381f24c9..8c801e5f6b 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -145,7 +145,7 @@ static NTSTATUS rpc_read(struct rpc_pipe_client *cli, { size_t size = (size_t)cli->max_recv_frag; uint32 stream_offset = 0; - ssize_t num_read; + ssize_t num_read = 0; char *pdata; ssize_t extra_data_size = ((ssize_t)*current_pdu_offset) + ((ssize_t)data_to_read) - (ssize_t)prs_data_size(current_pdu); @@ -839,9 +839,10 @@ static NTSTATUS rpc_api_pipe(struct rpc_pipe_client *cli, } rparam = NULL; prdata = SMB_MALLOC_ARRAY(char, 1); - if (prdata != NULL) { - nread = sys_read(cli->trans.tcp.sock, prdata, 1); + if (prdata == NULL) { + return NT_STATUS_NO_MEMORY; } + nread = sys_read(cli->trans.tcp.sock, prdata, 1); if (nread == 0) { SAFE_FREE(prdata); } |