mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Merge branch '556-race-condition-in-timer-creation' into 'master'
Fix crash caused by race condition in timer creation Closes #556 See merge request isc-projects/bind9!801
This commit is contained in:
@@ -398,8 +398,10 @@ isc__timer_create(isc_timermgr_t *manager0, isc_timertype_t type,
|
||||
result = schedule(timer, &now, true);
|
||||
else
|
||||
result = ISC_R_SUCCESS;
|
||||
if (result == ISC_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
*timerp = (isc_timer_t *)timer;
|
||||
APPEND(manager->timers, timer, link);
|
||||
}
|
||||
|
||||
UNLOCK(&manager->lock);
|
||||
|
||||
@@ -412,8 +414,6 @@ isc__timer_create(isc_timermgr_t *manager0, isc_timertype_t type,
|
||||
return (result);
|
||||
}
|
||||
|
||||
*timerp = (isc_timer_t *)timer;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user