]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c
Add the correct check for the return value before use them.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / SmmBaseHelper / SmmBaseHelper.c
index e491a946caaea40923635a671d5fbdbe0348306c..e447dd96ca76b4062376346877beda6e11838bcd 100644 (file)
@@ -422,6 +422,7 @@ InitCpuStatePageTable (
   } else {\r
     ASSERT ((Pde & mPhyMask) == (HookAddress & ~(SIZE_2MB-1))); // 2MB Page Point to HookAddress\r
     PageTable = AllocatePages (1);\r
+    ASSERT (PageTable != NULL);\r
     Address = HookAddress & ~(SIZE_2MB-1);\r
     for (Index = 0; Index < 512; Index++) {\r
       PageTable[Index] = Address | BIT0 | BIT1; // Present and RW\r