summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-04-20 16:19:01 +0800
committerStar Zeng <star.zeng@intel.com>2016-04-22 13:39:55 +0800
commit2bfac751a7229c5407b5e4571d95d3a07866ec3d (patch)
treea4f491cdebf3e36add635fdb129e2cf5afe6746a /MdeModulePkg/Core
parent21d4f0d52a46b12d2df83b925d10fa64cfa7b545 (diff)
downloadedk2-2bfac751a7229c5407b5e4571d95d3a07866ec3d.tar.gz
edk2-2bfac751a7229c5407b5e4571d95d3a07866ec3d.tar.bz2
edk2-2bfac751a7229c5407b5e4571d95d3a07866ec3d.zip
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>
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c2
1 files changed, 2 insertions, 0 deletions
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);