From: Stefan Metzmacher Date: Sat, 14 Jul 2018 08:55:02 +0000 (+0200) Subject: tevent: use talloc_zero_size() for the private state in tevent_context_wrapper_create() X-Git-Tag: ldb-1.5.0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d31bbf9793ca9d2041eb8769511aca6c9684e94;p=thirdparty%2Fsamba.git tevent: use talloc_zero_size() for the private state in tevent_context_wrapper_create() This is watch tevent_req_create() uses and what callers of tevent_context_wrapper_create() would therefore also expect. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/lib/tevent/tevent_wrapper.c b/lib/tevent/tevent_wrapper.c index a07696af0a4..ce07af98358 100644 --- a/lib/tevent/tevent_wrapper.c +++ b/lib/tevent/tevent_wrapper.c @@ -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;