[NTOSKRNL] Don't dereference VACB when allocating its memory area fails
authorPierre Schweitzer <pierre@reactos.org>
Sat, 8 Dec 2018 18:51:30 +0000 (19:51 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 8 Dec 2018 18:56:03 +0000 (19:56 +0100)
This avoids performing a double-free (even though that's hidden by the
fact we use lookaside allocations for VACB), and it avoids freeing
a memory address at an uninitialized address.
We don't care about references here, the VACB was just allocated, never
linked and we're its only user.

CORE-15413

ntoskrnl/cc/view.c

index b9c4930..d7dcfe1 100644 (file)
@@ -833,7 +833,6 @@ Retry:
             goto Retry;
         }
 
-        CcRosVacbDecRefCount(current);
         ExFreeToNPagedLookasideList(&VacbLookasideList, current);
         return Status;
     }