]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Mem: Initialize the variable MapMemory
authorShenglei Zhang <shenglei.zhang@intel.com>
Tue, 15 Oct 2019 02:13:35 +0000 (10:13 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 4 Nov 2019 00:56:12 +0000 (08:56 +0800)
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>
MdeModulePkg/Core/Dxe/Mem/HeapGuard.c

index 9477b94044ba92984f9016e165544e9920b721df..b4cb48843fb757c6ffb712c32a07eae4df0cdedf 100644 (file)
@@ -225,6 +225,8 @@ FindGuardedMemoryMap (
   UINTN                   BitsToUnitEnd;\r
   EFI_STATUS              Status;\r
 \r
+  MapMemory = 0;\r
+\r
   //\r
   // Adjust current map table depth according to the address to access\r
   //\r