From 311a71b2998b6f8c35c09c7a59a3d589dfa1c1e0 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Fri, 6 Feb 2009 03:58:04 +0000 Subject: 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 --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MdeModulePkg/Core') diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 6df0a9f..c9aad1c 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -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) { -- cgit v1.1