summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_pipe.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 99bd85af5d..28bbfa57b6 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2175,13 +2175,11 @@ static NTSTATUS rpc_finish_spnego_ntlmssp_bind(struct rpc_pipe_client *cli,
prs_init_empty(rbuf, talloc_tos(), UNMARSHALL);
nt_status = rpc_api_pipe(cli, &rpc_out, rbuf, RPC_ALTCONTRESP);
+ prs_mem_free(&rpc_out);
if (!NT_STATUS_IS_OK(nt_status)) {
- prs_mem_free(&rpc_out);
return nt_status;
}
- prs_mem_free(&rpc_out);
-
/* Get the auth blob from the reply. */
if(!smb_io_rpc_hdr("rpc_hdr ", phdr, rbuf, 0)) {
DEBUG(0,("rpc_finish_spnego_ntlmssp_bind: Failed to unmarshall RPC_HDR.\n"));
@@ -2257,13 +2255,11 @@ NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
/* send data on \PIPE\. receive a response */
status = rpc_api_pipe(cli, &rpc_out, &rbuf, RPC_BINDACK);
+ prs_mem_free(&rpc_out);
if (!NT_STATUS_IS_OK(status)) {
- prs_mem_free(&rpc_out);
return status;
}
- prs_mem_free(&rpc_out);
-
DEBUG(3,("rpc_pipe_bind: %s bind request returned ok.\n",
rpccli_pipe_txt(debug_ctx(), cli)));