summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorShenglei Zhang <shenglei.zhang@intel.com>2019-10-15 10:13:35 +0800
committerLiming Gao <liming.gao@intel.com>2019-11-04 08:56:12 +0800
commit17efd446c00b414ddeb53ec00b85d780f2f09250 (patch)
tree5bc63d6eb6caf421d1578483a3ba22870cca563c /MdeModulePkg/Core
parenta857ea4199ead1858e55b081fea38fcf0e721c8c (diff)
downloadedk2-17efd446c00b414ddeb53ec00b85d780f2f09250.tar.gz
edk2-17efd446c00b414ddeb53ec00b85d780f2f09250.tar.bz2
edk2-17efd446c00b414ddeb53ec00b85d780f2f09250.zip
MdeModulePkg/Mem: Initialize the variable MapMemory
MapMemory is not initialized by FindGuardedMemoryMap or CoreInternalAllocatePages which calls MapMemory. So we give a 0 to it. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/HeapGuard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
index 9477b94044..b4cb48843f 100644
--- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
+++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
@@ -225,6 +225,8 @@ FindGuardedMemoryMap (
UINTN BitsToUnitEnd;
EFI_STATUS Status;
+ MapMemory = 0;
+
//
// Adjust current map table depth according to the address to access
//