From d6bf79a7f52ee90fa3d81b60d360beae0dc88e55 Mon Sep 17 00:00:00 2001 From: niruiyu Date: Mon, 31 Jan 2011 04:15:27 +0000 Subject: Add assertion after memory allocation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11288 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe') 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)) { -- cgit v1.2.3