summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-24 13:17:23 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-25 01:39:41 +0200
commit81bc57d39536516d64fd59978e300d64eac1d97c (patch)
tree52f3e3e4912c30e4ae2e66e3772eebcf278287ea
parent28350aeaa19d419bfc8f2fef69b136f42a0234ae (diff)
downloadsamba-81bc57d39536516d64fd59978e300d64eac1d97c.tar.gz
s4:librpc/rpc: use talloc_zero for 'struct rpc_request'
metze
-rw-r--r--source4/librpc/rpc/dcerpc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 4cec4b596c7..155150ed97c 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -1478,22 +1478,14 @@ static struct rpc_request *dcerpc_request_send(TALLOC_CTX *mem_ctx,
p->conn->transport.recv_data = dcerpc_recv_data;
- req = talloc(mem_ctx, struct rpc_request);
+ req = talloc_zero(mem_ctx, struct rpc_request);
if (req == NULL) {
return NULL;
}
req->p = p;
req->call_id = next_call_id(p->conn);
- req->status = NT_STATUS_OK;
req->state = RPC_REQUEST_QUEUED;
- req->payload = data_blob(NULL, 0);
- req->flags = 0;
- req->fault_code = 0;
- req->ignore_timeout = false;
- req->async.callback = NULL;
- req->async.private_data = NULL;
- req->recv_handler = NULL;
if (object != NULL) {
req->object = (struct GUID *)talloc_memdup(req, (const void *)object, sizeof(*object));
@@ -1501,8 +1493,6 @@ static struct rpc_request *dcerpc_request_send(TALLOC_CTX *mem_ctx,
talloc_free(req);
return NULL;
}
- } else {
- req->object = NULL;
}
req->opnum = opnum;