diff options
author | Volker Lendecke <vl@samba.org> | 2021-08-13 15:51:07 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-08-24 17:32:28 +0000 |
commit | a3f7f279ff0663eb25c24cfcc2104e98e210a210 (patch) | |
tree | dac5daae1b9e200d606bc908042351a4151ac747 | |
parent | c4aea464bb0eebdf1a7db2564e5d9ca37baf11f5 (diff) | |
download | samba-a3f7f279ff0663eb25c24cfcc2104e98e210a210.tar.gz |
rpc_client: Adapt rpc_pipe_bind_send() to talloc_req conventions
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 8ddb45742e9..0f4526688ba 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1881,23 +1881,17 @@ struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx, if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { - goto post_status; + tevent_req_nterror(req, status); + return tevent_req_post(req, ev); } subreq = rpc_api_pipe_send(state, ev, cli, &state->rpc_out, DCERPC_PKT_BIND_ACK, state->rpc_call_id); - if (subreq == NULL) { - goto fail; + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); } tevent_req_set_callback(subreq, rpc_pipe_bind_step_one_done, req); return req; - - post_status: - tevent_req_nterror(req, status); - return tevent_req_post(req, ev); - fail: - TALLOC_FREE(req); - return NULL; } static void rpc_pipe_bind_step_one_done(struct tevent_req *subreq) |