]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg DxeCore: Fix a memory leak in InstallMemoryAttributesTable()
authorStar Zeng <star.zeng@intel.com>
Wed, 20 Apr 2016 08:19:01 +0000 (16:19 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 22 Apr 2016 05:39:55 +0000 (13:39 +0800)
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>
MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c

index 416ed3dca846b481014e802e62c7424b4dd251d4..0362212c8b0b2c45aa9b6ef69b8c8addea9772be 100644 (file)
@@ -174,6 +174,8 @@ InstallMemoryAttributesTable (
     }\r
     MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize);\r
   }\r
+  MemoryMap = MemoryMapStart;\r
+  FreePool (MemoryMap);\r
 \r
   Status = gBS->InstallConfigurationTable (&gEfiMemoryAttributesTableGuid, MemoryAttributesTable);\r
   ASSERT_EFI_ERROR (Status);\r