mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 05:54:05 +00:00
Fix the check for an empty list.
svn path=/trunk/; revision=20884
This commit is contained in:
parent
68151ba039
commit
aab50d9dd5
|
@ -287,6 +287,8 @@ KiInsertQueueApc(PKAPC Apc,
|
|||
PKAPC QueuedApc;
|
||||
NTSTATUS Status;
|
||||
|
||||
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
|
||||
|
||||
/* Acquire the lock (only needed on MP) */
|
||||
KeAcquireSpinLockAtDpcLevel(&Thread->ApcQueueLock);
|
||||
|
||||
|
@ -790,7 +792,7 @@ KiDeliverApc(KPROCESSOR_MODE DeliveryMode,
|
|||
ApcListEntry = Thread->ApcState.ApcListHead[UserMode].Flink;
|
||||
|
||||
/* Is it empty now? */
|
||||
if (!ApcListEntry)
|
||||
if (ApcListEntry == &Thread->ApcState.ApcListHead[UserMode])
|
||||
{
|
||||
/* Release the lock and return */
|
||||
KeReleaseSpinLock(&Thread->ApcQueueLock, OldIrql);
|
||||
|
|
Loading…
Reference in a new issue