]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
initialize state object in test-async driver
authorEvan Hunt <each@isc.org>
Fri, 14 May 2021 09:35:12 +0000 (02:35 -0700)
committerOndřej Surý <ondrej@sury.org>
Fri, 9 Jul 2021 13:58:02 +0000 (15:58 +0200)
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

index 9ea950af461edb6287277f51e005720dac0db13b..f3deee2b83794565303f2a01757a4e4cdc4373e5 100644 (file)
@@ -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,