summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-06 15:37:56 -0700
committerVolker Lendecke <vl@samba.org>2013-09-08 13:39:25 +0200
commit8f4069c7cd10a143286c7a32c1b612380afd7c72 (patch)
treec924e773ac88bf272014bc68ea19346622d58949 /lib/tevent
parent7f9bdabda53b63497d67d844198a28bf3ba04693 (diff)
downloadsamba-8f4069c7cd10a143286c7a32c1b612380afd7c72.tar.gz
samba-8f4069c7cd10a143286c7a32c1b612380afd7c72.tar.bz2
samba-8f4069c7cd10a143286c7a32c1b612380afd7c72.zip
tevent: Use talloc_pooled_object for tevent_req_create
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Sep 8 13:39:25 CEST 2013 on sn-devel-104
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/tevent_req.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index d8d0c5f564..556d9848e1 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -61,10 +61,13 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
void **ppdata = (void **)pdata;
void *data;
- req = talloc_zero(mem_ctx, struct tevent_req);
+ req = talloc_pooled_object(
+ mem_ctx, struct tevent_req, 2,
+ sizeof(struct tevent_immediate) + data_size);
if (req == NULL) {
return NULL;
}
+ ZERO_STRUCTP(req);
req->internal.private_type = type;
req->internal.create_location = location;
req->internal.finish_location = NULL;