summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_client/cli_pipe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index a2e0dab990..c809ac1ac7 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2174,7 +2174,8 @@ static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe
/* sanity check to protect against crashes */
if ( !cli ) {
- return NT_STATUS_INVALID_HANDLE;
+ *perr = NT_STATUS_INVALID_HANDLE;
+ return NULL;
}
/* The pipe name index must fall within our array */