[NTOS:CC] CcRosCreateVacb: Return error code on pool allocation failure (#7275)

Return STATUS_INSUFFICIENT_RESOURCES error code instead of accessing the invalid pointer.
This commit is contained in:
Thamatip Chitpong 2024-08-30 07:34:48 +07:00 committed by GitHub
parent 6ae11ba09d
commit 95c340dfb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -812,6 +812,10 @@ CcRosCreateVacb (
DPRINT("CcRosCreateVacb()\n");
current = ExAllocateFromNPagedLookasideList(&VacbLookasideList);
if (!current)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
current->BaseAddress = NULL;
current->Dirty = FALSE;
current->PageOut = FALSE;