[NTOS:MM] Assert MmLocateMemoryAreaByAddress return value to satisfy Coverity. CID...
authorThomas Faber <thomas.faber@reactos.org>
Fri, 26 Jan 2018 12:56:06 +0000 (13:56 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 28 Jan 2018 09:48:27 +0000 (10:48 +0100)
ntoskrnl/mm/ARM3/virtual.c

index 97f017f..f0ab5d0 100644 (file)
@@ -4742,7 +4742,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
         goto FailPath;
     }
 
-       if ((AllocationType & MEM_RESET) == MEM_RESET)
+    if ((AllocationType & MEM_RESET) == MEM_RESET)
     {
         /// @todo HACK: pretend success
         DPRINT("MEM_RESET not supported\n");
@@ -4778,6 +4778,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
     // Make sure this is an ARM3 section
     //
     MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, (PVOID)PAGE_ROUND_DOWN(PBaseAddress));
+    ASSERT(MemoryArea != NULL);
     if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
     {
         DPRINT1("Illegal commit of non-ARM3 section!\n");