Cleanup K8 warning.

We need judge return status of CoreGetMemorySpaceMap() to avoid the generation of NULL pointer of MemorySpaceMap.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7448 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-02-06 03:58:04 +00:00
parent 18e81d77cf
commit 311a71b299
1 changed files with 2 additions and 0 deletions

View File

@ -2151,6 +2151,8 @@ CoreInitializeGcdServices (
// Add and allocate the remaining unallocated system memory to the memory services.
//
Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap);
ASSERT (Status == EFI_SUCCESS);
for (Index = 0; Index < NumberOfDescriptors; Index++) {
if (MemorySpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {
if (MemorySpaceMap[Index].ImageHandle == NULL) {