summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-01-31 04:15:27 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-01-31 04:15:27 +0000
commitd6bf79a7f52ee90fa3d81b60d360beae0dc88e55 (patch)
treed3c043c888434736bc0f06fea3ae279b858b06b2 /IntelFrameworkModulePkg
parentf43c43c72cad940588880d1014e1d462cae75d36 (diff)
downloadedk2-platforms-d6bf79a7f52ee90fa3d81b60d360beae0dc88e55.tar.xz
Add assertion after memory allocation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11288 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
index 4a3fc46acf..24b7c1364a 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
@@ -438,6 +438,8 @@ OrderLegacyBootOption4SameType (
// Record the EnBootOption and DisBootOption according to the DevOrder
//
NewBootOption = AllocatePool (DevOrderCount * sizeof (UINT16));
+ ASSERT (NewBootOption != NULL);
+
while (DevOrderCount-- != 0) {
for (Index = 0; Index < mBootOptionBbsMappingCount; Index++) {
if (mBootOptionBbsMapping[Index].BbsIndex == (DevOrder[DevOrderCount] & 0xFF)) {