From 62d06a4987e44c0004b4fd1fa16193d79692fdd0 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 14 May 2021 02:35:12 -0700 Subject: [PATCH] initialize state object in test-async driver the hooks system test was failing due to a block of memory not having been zeroed after allocation. --- bin/tests/system/hooks/driver/test-async.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/tests/system/hooks/driver/test-async.c b/bin/tests/system/hooks/driver/test-async.c index 9ea950af46..f3deee2b83 100644 --- a/bin/tests/system/hooks/driver/test-async.c +++ b/bin/tests/system/hooks/driver/test-async.c @@ -226,9 +226,7 @@ client_state_create(const query_ctx_t *qctx, async_instance_t *inst) { isc_result_t result; state = isc_mem_get(inst->mctx, sizeof(*state)); - if (state == NULL) { - return; - } + *state = (state_t){ .async = false }; LOCK(&inst->hlock); result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client,