mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOSKRNL] Properly delete VACB in CcRosCreateVacb() when mapping fails.
Spotted by Thomas. CORE-14478 CORE-14502
This commit is contained in:
parent
c9cda4cb37
commit
ffd524275e
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue