]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_client: Simplify rpc_api_pipe_auth3_done()
authorVolker Lendecke <vl@samba.org>
Fri, 6 Aug 2021 12:16:22 +0000 (14:16 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 24 Aug 2021 17:32:29 +0000 (17:32 +0000)
Use tevent_req_simple_finish_ntstatus()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_client/cli_pipe.c

index d1a535beca0f7088a574511908b765d08d0fbbfe..193a99cb6eec40567025f24a54f51957b8e02332 100644 (file)
@@ -846,19 +846,8 @@ static struct tevent_req *rpc_api_pipe_send(TALLOC_CTX *mem_ctx,
 
 static void rpc_api_pipe_auth3_done(struct tevent_req *subreq)
 {
-       struct tevent_req *req =
-               tevent_req_callback_data(subreq,
-               struct tevent_req);
-       NTSTATUS status;
-
-       status = rpc_write_recv(subreq);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       tevent_req_done(req);
+       NTSTATUS status = rpc_write_recv(subreq);
+       return tevent_req_simple_finish_ntstatus(subreq, status);
 }
 
 static void rpc_api_pipe_trans_done(struct tevent_req *subreq)