From f80a474e59af2dd9557afd5259a8e0cdb545fb7c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 29 Oct 2021 16:57:16 +1100 Subject: [PATCH] 'task' is reported when uninitalised move XTRACE to after 'task' is created so that 'task' is valid --- lib/isc/task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/task.c b/lib/isc/task.c index 2cfe953b33..6f075ebdf7 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -210,11 +210,11 @@ isc_task_create_bound(isc_taskmgr_t *manager, unsigned int quantum, REQUIRE(VALID_MANAGER(manager)); REQUIRE(taskp != NULL && *taskp == NULL); - XTRACE("isc_task_create"); - task = isc_mem_get(manager->mctx, sizeof(*task)); *task = (isc_task_t){ 0 }; + XTRACE("isc_task_create"); + isc_taskmgr_attach(manager, &task->manager); if (threadid == -1) {