]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
Add assertion after memory allocation.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.c
index 4a3fc46acf15be149c79a886c3bbfc3137339cff..24b7c1364a2645bbf10ed5c47579ba70a78d5759 100644 (file)
@@ -438,6 +438,8 @@ OrderLegacyBootOption4SameType (
   // Record the EnBootOption and DisBootOption according to the DevOrder\r
   //\r
   NewBootOption = AllocatePool (DevOrderCount * sizeof (UINT16));\r
+  ASSERT (NewBootOption != NULL);\r
+\r
   while (DevOrderCount-- != 0) {\r
     for (Index = 0; Index < mBootOptionBbsMappingCount; Index++) {\r
       if (mBootOptionBbsMapping[Index].BbsIndex == (DevOrder[DevOrderCount] & 0xFF)) {\r