]> git.ipfire.org Git - thirdparty/bind9.git/commit
Destroy reference to taskmgr after all tasks are done
authorOndřej Surý <ondrej@sury.org>
Mon, 10 May 2021 12:11:25 +0000 (14:11 +0200)
committerEvan Hunt <each@isc.org>
Mon, 10 May 2021 19:13:27 +0000 (12:13 -0700)
commite623c12757b071ecf07696b9d35a7d3668aa7dfa
tree05ba04798f44200a2fa74b8f9bf8f25db4832953
parentd3ebd19e23c669439784bc38320e7a848c5d8f68
Destroy reference to taskmgr after all tasks are done

We were clearing the pointer to taskmgr as soon as isc_taskmgr_destroy()
would be called and before all tasks were finished.  Unfortunately, some
tasks would use global named_g_taskmgr objects from inside the events
and this would cause either a data race or NULL pointer dereference.

This commit fixes the data race by moving the destruction of the
referenced pointer to the time after all tasks are finished.
lib/isc/task.c