]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
'task' is reported when uninitalised
authorMark Andrews <marka@isc.org>
Fri, 29 Oct 2021 05:57:16 +0000 (16:57 +1100)
committerMark Andrews <marka@isc.org>
Mon, 1 Nov 2021 06:42:37 +0000 (17:42 +1100)
move XTRACE to after 'task' is created so that 'task' is valid

lib/isc/task.c

index 2cfe953b339b2f1243b88be3ae2df48825655a9d..6f075ebdf78719024525c4e5e8852c82783b2f09 100644 (file)
@@ -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) {