From 95a1f88d930808a7f1e63f47d78f349b4967b8a4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 11 Jun 2008 10:44:47 +0200 Subject: rpc_client: fix some valgrind warnings. Guenther (This used to be commit 0352682a355b42ced7628a720a6889d8453e7946) --- source3/rpc_client/cli_pipe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/rpc_client') 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; -- cgit