From 2bfac751a7229c5407b5e4571d95d3a07866ec3d Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Wed, 20 Apr 2016 16:19:01 +0800 Subject: [PATCH] MdeModulePkg DxeCore: Fix a memory leak in InstallMemoryAttributesTable() Cc: Jiewen Yao Cc: Liming Gao Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c index 416ed3dca8..0362212c8b 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c @@ -174,6 +174,8 @@ InstallMemoryAttributesTable ( } MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize); } + MemoryMap = MemoryMapStart; + FreePool (MemoryMap); Status = gBS->InstallConfigurationTable (&gEfiMemoryAttributesTableGuid, MemoryAttributesTable); ASSERT_EFI_ERROR (Status); -- 2.39.2