summaryrefslogtreecommitdiff
path: root/librpc/rpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-06-06 11:37:59 +0200
committerStefan Metzmacher <metze@samba.org>2013-06-14 22:27:43 +0200
commit9f25ad44a93da09b3a7c14a4a1a0e78c5a1b529c (patch)
treefbdf72751313748b0c79fe16b470c7fb465a8ec5 /librpc/rpc
parent7982d2aff89c7ff8a2371163bad5f9f88be6af46 (diff)
downloadsamba-9f25ad44a93da09b3a7c14a4a1a0e78c5a1b529c.tar.gz
samba-9f25ad44a93da09b3a7c14a4a1a0e78c5a1b529c.tar.bz2
samba-9f25ad44a93da09b3a7c14a4a1a0e78c5a1b529c.zip
librpc: Shorten dcerpc_binding_handle_call a bit
... saves 200 bytes on 64 bit Linux with -O3 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 14 22:27:43 CEST 2013 on sn-devel-104
Diffstat (limited to 'librpc/rpc')
-rw-r--r--librpc/rpc/binding_handle.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c
index c3dc4731fb..9354bbdc68 100644
--- a/librpc/rpc/binding_handle.c
+++ b/librpc/rpc/binding_handle.c
@@ -515,7 +515,7 @@ NTSTATUS dcerpc_binding_handle_call(struct dcerpc_binding_handle *h,
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
struct tevent_req *subreq;
- NTSTATUS status;
+ NTSTATUS status = NT_STATUS_NO_MEMORY;
/*
* TODO: allow only one sync call
@@ -527,29 +527,22 @@ NTSTATUS dcerpc_binding_handle_call(struct dcerpc_binding_handle *h,
ev = samba_tevent_context_init(frame);
}
if (ev == NULL) {
- talloc_free(frame);
- return NT_STATUS_NO_MEMORY;
+ goto fail;
}
subreq = dcerpc_binding_handle_call_send(frame, ev,
h, object, table,
opnum, r_mem, r_ptr);
if (subreq == NULL) {
- talloc_free(frame);
- return NT_STATUS_NO_MEMORY;
+ goto fail;
}
if (!tevent_req_poll_ntstatus(subreq, ev, &status)) {
- talloc_free(frame);
- return status;
+ goto fail;
}
status = dcerpc_binding_handle_call_recv(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- talloc_free(frame);
- return status;
- }
-
+fail:
TALLOC_FREE(frame);
- return NT_STATUS_OK;
+ return status;
}