ntoskrnl.exe: Cancel active timer before setting it.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2020-05-28 12:15:18 +03:00 committed by Alexandre Julliard
parent 4584ffadda
commit 6cb3588969
1 changed files with 3 additions and 1 deletions

View File

@ -443,7 +443,9 @@ BOOLEAN WINAPI KeSetTimerEx( KTIMER *timer, LARGE_INTEGER duetime, LONG period,
EnterCriticalSection( &sync_cs );
ret = timer->Header.Inserted;
if ((ret = timer->Header.Inserted))
KeCancelTimer(timer);
timer->Header.Inserted = TRUE;
if (!timer->TimerListEntry.Blink)