mirror of https://github.com/acidanthera/audk.git
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:
parent
f43c43c72c
commit
d6bf79a7f5
|
@ -438,6 +438,8 @@ OrderLegacyBootOption4SameType (
|
||||||
// Record the EnBootOption and DisBootOption according to the DevOrder
|
// Record the EnBootOption and DisBootOption according to the DevOrder
|
||||||
//
|
//
|
||||||
NewBootOption = AllocatePool (DevOrderCount * sizeof (UINT16));
|
NewBootOption = AllocatePool (DevOrderCount * sizeof (UINT16));
|
||||||
|
ASSERT (NewBootOption != NULL);
|
||||||
|
|
||||||
while (DevOrderCount-- != 0) {
|
while (DevOrderCount-- != 0) {
|
||||||
for (Index = 0; Index < mBootOptionBbsMappingCount; Index++) {
|
for (Index = 0; Index < mBootOptionBbsMappingCount; Index++) {
|
||||||
if (mBootOptionBbsMapping[Index].BbsIndex == (DevOrder[DevOrderCount] & 0xFF)) {
|
if (mBootOptionBbsMapping[Index].BbsIndex == (DevOrder[DevOrderCount] & 0xFF)) {
|
||||||
|
|
Loading…
Reference in New Issue