Add assertion after memory allocation.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11288 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu 2011-01-31 04:15:27 +00:00
parent f43c43c72c
commit d6bf79a7f5
1 changed files with 2 additions and 0 deletions

View File

@ -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)) {