]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg,ArmPlatformPkg: Free memory allocated by Get.*SpaceMap()
authorOlivier Martin <olivier.martin@arm.com>
Fri, 26 Jul 2013 17:12:12 +0000 (17:12 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 Jul 2013 17:12:12 +0000 (17:12 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14507 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
ArmPkg/Drivers/CpuDxe/ArmV6/Mmu.c
ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c

index 9043afaffad5ba0402bbda87aef3416274de004a..da6e6225bed28751dc1c043261912232e422df4f 100644 (file)
@@ -15,6 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 --*/\r
 \r
+#include <Library/MemoryAllocationLib.h>\r
 #include "CpuDxe.h"\r
 \r
 #define TT_ATTR_INDX_INVALID    ((UINT32)~0)\r
@@ -122,6 +123,8 @@ GetNextEntryAttribute (
     }\r
   }\r
 \r
+  FreePool (MemorySpaceMap);\r
+\r
   return BaseAddress + (EntryCount * TT_ADDRESS_AT_LEVEL(TableLevel));\r
 }\r
 \r
@@ -185,5 +188,7 @@ SyncCacheConfig (
       EndAddressGcdRegion - BaseAddressGcdRegion,\r
       PageAttributeToGcdAttribute (PageAttribute));\r
 \r
+  FreePool (MemorySpaceMap);\r
+\r
   return EFI_SUCCESS;\r
 }\r
index 2dbdb689fe4e7f2d23bc3d046be9a57c327ba213..ce8bd65c24178c69aae5d38dbec2032c0f4a14d7 100644 (file)
@@ -2,18 +2,20 @@
 \r
 Copyright (c) 2009, Hewlett-Packard Company. All rights reserved.<BR>\r
 Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR>\r
+Portions copyright (c) 2013, ARM Ltd. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
 --*/\r
 \r
+#include <Library/MemoryAllocationLib.h>\r
 #include "CpuDxe.h"\r
 \r
 // First Level Descriptors\r
@@ -330,6 +332,8 @@ SyncCacheConfig (
     SetGcdMemorySpaceAttributes (MemorySpaceMap, NumberOfDescriptors, NextRegionBase, NextRegionLength, GcdAttributes);\r
   }\r
 \r
+  FreePool (MemorySpaceMap);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index b45e85d9af25392d162fc8de0baaaff539e4fb50..9319050b0647f6ec22773908d4b45a6cea2719e5 100644 (file)
@@ -337,6 +337,8 @@ EblDumpGcd (
     AsciiPrint ("\n");\r
   }\r
 \r
+  FreePool (MemorySpaceMap);\r
+\r
   Status = gDS->GetIoSpaceMap(&NumberOfDescriptors,&IoSpaceMap);\r
   if (EFI_ERROR (Status)) {\r
       return Status;\r
@@ -355,6 +357,8 @@ EblDumpGcd (
     AsciiPrint ("\n");\r
   }\r
 \r
+  FreePool (IoSpaceMap);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r