]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add assertion after memory allocation.
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Jan 2011 04:15:27 +0000 (04:15 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Jan 2011 04:15:27 +0000 (04:15 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11288 6f19259b-4bc3-4df7-8a09-765794883524

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