MdeModulePkg DxeCore: Fix a memory leak in InstallMemoryAttributesTable()

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Star Zeng 2016-04-20 16:19:01 +08:00
parent 21d4f0d52a
commit 2bfac751a7
1 changed files with 2 additions and 0 deletions

View File

@ -174,6 +174,8 @@ InstallMemoryAttributesTable (
}
MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize);
}
MemoryMap = MemoryMapStart;
FreePool (MemoryMap);
Status = gBS->InstallConfigurationTable (&gEfiMemoryAttributesTableGuid, MemoryAttributesTable);
ASSERT_EFI_ERROR (Status);