[NTOSKRNL] Properly reset pinning state on pinning failure

This commit is contained in:
Pierre Schweitzer 2018-08-26 22:56:25 +02:00
parent 54f89baad4
commit b8e4af606a
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -191,6 +191,12 @@ CcPinMappedData (
Result = ExAcquireSharedStarveExclusive(&iBcb->Lock, BooleanFlagOn(Flags, PIN_WAIT));
}
if (!Result)
{
iBcb->Pinned = FALSE;
iBcb->Vacb->PinCount--;
}
return Result;
}