mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 04:09:59 -04:00
Don't stop timer from dns__nta_shutdown()
The dns__nta_shutdown() could be run from different threads and it was accessing nta->timer unlocked. Don't check and stop the timer from dns__nta_shutdown() directly, but leave it for the async callback.
This commit is contained in:
parent
9beb68513b
commit
01f0f9dcdc
1 changed files with 1 additions and 5 deletions
|
|
@ -645,7 +645,7 @@ dns__nta_shutdown_cb(dns__nta_t *nta) {
|
|||
REQUIRE(VALID_NTA(nta));
|
||||
|
||||
if (nta->timer) {
|
||||
isc_timer_stop(nta->timer); /* This is superfluous */
|
||||
isc_timer_stop(nta->timer);
|
||||
isc_timer_destroy(&nta->timer);
|
||||
}
|
||||
|
||||
|
|
@ -656,10 +656,6 @@ static void
|
|||
dns__nta_shutdown(dns__nta_t *nta) {
|
||||
REQUIRE(VALID_NTA(nta));
|
||||
|
||||
if (nta->timer != NULL) {
|
||||
isc_timer_stop(nta->timer);
|
||||
}
|
||||
|
||||
dns__nta_ref(nta);
|
||||
isc_async_run(nta->loop, (isc_job_cb)dns__nta_shutdown_cb, nta);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue