tevent: Use talloc_pooled_object for tevent_req_create
authorVolker Lendecke <vl@samba.org>
Fri, 6 Sep 2013 22:37:56 +0000 (15:37 -0700)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Sep 2013 11:39:25 +0000 (13:39 +0200)
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

lib/tevent/tevent_req.c

index d8d0c5f56455492979635d1a235f5be6db5f7ccc..556d9848e13dad88888974c33a183aef902a3375 100644 (file)
@@ -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;