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
// Add and allocate the remaining unallocated system memory to the memory services.\r
//\r
Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap);\r
+ ASSERT (Status == EFI_SUCCESS);\r
+\r
for (Index = 0; Index < NumberOfDescriptors; Index++) {\r
if (MemorySpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {\r
if (MemorySpaceMap[Index].ImageHandle == NULL) {\r