Fix a possible mutex leak in KeSetTimerEx(): if timer is NULL, we
bail out without releasing the dispatcher lock. Move the lock acquisition after the pointer test to avoid this.
This commit is contained in:
parent
ba467ce430
commit
c3c51190cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144342
@ -2575,11 +2575,11 @@ KeSetTimerEx(timer, duetime, period, dpc)
|
||||
uint64_t curtime;
|
||||
uint8_t pending;
|
||||
|
||||
mtx_lock(&ntoskrnl_dispatchlock);
|
||||
|
||||
if (timer == NULL)
|
||||
return(FALSE);
|
||||
|
||||
mtx_lock(&ntoskrnl_dispatchlock);
|
||||
|
||||
if (timer->k_header.dh_inserted == TRUE) {
|
||||
untimeout(ntoskrnl_timercall, timer, timer->k_handle);
|
||||
timer->k_header.dh_inserted = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user