tevent: use talloc_zero_size() for the private state in tevent_context_wrapper_create()
authorStefan Metzmacher <metze@samba.org>
Sat, 14 Jul 2018 08:55:02 +0000 (10:55 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 24 Jul 2018 15:38:25 +0000 (17:38 +0200)
This is watch tevent_req_create() uses and what callers of
tevent_context_wrapper_create() would therefore also expect.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/tevent/tevent_wrapper.c

index a07696af0a4d155f2c918be0dcf10fd77e361596..ce07af9835880aef7b05eb1b48ce4261e1c4849d 100644 (file)
@@ -371,7 +371,7 @@ struct tevent_context *_tevent_context_wrapper_create(struct tevent_context *mai
        ev->wrapper.glue->wrap_ev = ev;
        ev->wrapper.glue->main_ev = main_ev;
        ev->wrapper.glue->ops = ops;
-       ev->wrapper.glue->private_state = talloc_size(ev->wrapper.glue, psize);
+       ev->wrapper.glue->private_state = talloc_zero_size(ev->wrapper.glue, psize);
        if (ev->wrapper.glue->private_state == NULL) {
                talloc_free(ev);
                return NULL;