mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[NTOSKRNL] Properly delete VACB in CcRosCreateVacb() when mapping fails.
Spotted by Thomas. CORE-14478 CORE-14502
This commit is contained in:
@@ -831,18 +831,20 @@ CcRosCreateVacb (
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Reference it to allow release */
|
||||
CcRosVacbIncRefCount(current);
|
||||
|
||||
Status = CcRosMapVacbInKernelSpace(current);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
RemoveEntryList(¤t->CacheMapVacbListEntry);
|
||||
RemoveEntryList(¤t->VacbLruListEntry);
|
||||
CcRosReleaseVacbLock(current);
|
||||
CcRosReleaseVacb(SharedCacheMap, current, FALSE,
|
||||
FALSE, FALSE);
|
||||
CcRosVacbDecRefCount(current);
|
||||
ExFreeToNPagedLookasideList(&VacbLookasideList, current);
|
||||
}
|
||||
|
||||
/* Reference it to allow release */
|
||||
CcRosVacbIncRefCount(current);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user