diff options
author | Günther Deschner <gd@samba.org> | 2008-06-11 10:44:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-11 10:47:21 +0200 |
commit | 95a1f88d930808a7f1e63f47d78f349b4967b8a4 (patch) | |
tree | defe8b742c3d0cb9cf002aef006ea90f17928844 /source3 | |
parent | 79fbc59cfc17327ecde5f4621f8e44d042becfab (diff) | |
download | samba-95a1f88d930808a7f1e63f47d78f349b4967b8a4.tar.gz samba-95a1f88d930808a7f1e63f47d78f349b4967b8a4.tar.bz2 samba-95a1f88d930808a7f1e63f47d78f349b4967b8a4.zip |
rpc_client: fix some valgrind warnings.
Guenther
(This used to be commit 0352682a355b42ced7628a720a6889d8453e7946)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 8ba79d3c6d..ba6fbddf7f 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2522,7 +2522,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host, struct sockaddr_storage addr; NTSTATUS status; - result = talloc(mem_ctx, struct rpc_pipe_client); + result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client); if (result == NULL) { return NT_STATUS_NO_MEMORY; } @@ -2705,6 +2705,8 @@ NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host, NTSTATUS status; uint16_t port = 0; + *presult = NULL; + status = rpc_pipe_get_tcp_port(host, abstract_syntax, &port); if (!NT_STATUS_IS_OK(status)) { goto done; @@ -2877,7 +2879,7 @@ static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe_idx, NTSTATUS *perr) { - struct rpc_pipe_client *result; + struct rpc_pipe_client *result = NULL; *perr = NT_STATUS_PIPE_NOT_AVAILABLE; |