summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-01-30 09:54:24 +0100
committerGünther Deschner <gd@samba.org>2014-02-11 16:20:28 +0100
commit47d7b8df44551c435b9924e9e39a9068ebbee2a1 (patch)
treef52de93b6da0a4ae5fe2b26e04034e6ed3883548 /source3/librpc
parentf9cc66055ddf09699b5bee229e10fdbf9ca5ce93 (diff)
downloadsamba-47d7b8df44551c435b9924e9e39a9068ebbee2a1.tar.gz
s3:dcerpc_up: avoid useless talloc_zero() calls
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/rpc/dcerpc_ep.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
index 99a88c42512..ee2d8355def 100644
--- a/source3/librpc/rpc/dcerpc_ep.c
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -103,12 +103,9 @@ NTSTATUS dcerpc_binding_vector_add_np_default(const struct ndr_interface_table *
for (i = 0; i < ep_count; i++) {
struct dcerpc_binding *b;
- b = talloc_zero(bvec->bindings, struct dcerpc_binding);
- if (b == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- status = dcerpc_parse_binding(b, iface->endpoints->names[i], &b);
+ status = dcerpc_parse_binding(bvec->bindings,
+ iface->endpoints->names[i],
+ &b);
if (!NT_STATUS_IS_OK(status)) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -153,12 +150,9 @@ NTSTATUS dcerpc_binding_vector_add_port(const struct ndr_interface_table *iface,
for (i = 0; i < ep_count; i++) {
struct dcerpc_binding *b;
- b = talloc_zero(bvec->bindings, struct dcerpc_binding);
- if (b == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- status = dcerpc_parse_binding(b, iface->endpoints->names[i], &b);
+ status = dcerpc_parse_binding(bvec->bindings,
+ iface->endpoints->names[i],
+ &b);
if (!NT_STATUS_IS_OK(status)) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -209,12 +203,9 @@ NTSTATUS dcerpc_binding_vector_add_unix(const struct ndr_interface_table *iface,
for (i = 0; i < ep_count; i++) {
struct dcerpc_binding *b;
- b = talloc_zero(bvec->bindings, struct dcerpc_binding);
- if (b == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- status = dcerpc_parse_binding(b, iface->endpoints->names[i], &b);
+ status = dcerpc_parse_binding(bvec->bindings,
+ iface->endpoints->names[i],
+ &b);
if (!NT_STATUS_IS_OK(status)) {
return NT_STATUS_UNSUCCESSFUL;
}