Remove erroneous 'presult = NULL' changes. Now presult only gets set
authorJeremy Allison <jra@samba.org>
Thu, 12 Nov 2009 21:59:25 +0000 (13:59 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 12 Nov 2009 21:59:25 +0000 (13:59 -0800)
if NTSTATUS == OK.
Jeremy.

source3/rpc_client/cli_pipe.c

index 0e658a2da8de63dba7a1bcbc5de7cf7b0735116b..084bbef44c4e1b012cb4c5234368b4633b274316 100644 (file)
@@ -3469,18 +3469,13 @@ 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;
+               return status;
        }
 
-       status = rpc_pipe_open_tcp_port(mem_ctx, host, port,
+       return rpc_pipe_open_tcp_port(mem_ctx, host, port,
                                        abstract_syntax, presult);
-
-done:
-       return status;
 }
 
 /********************************************************************
@@ -4123,8 +4118,6 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
        struct rpc_pipe_client *result = NULL;
        NTSTATUS status;
 
-       *presult = NULL;
-
        status = get_schannel_session_key(cli, domain, &neg_flags,
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(status)) {