Skip to content

Commit

Permalink
MdeModulePkg/Mem: Initialize the variable MapMemory
Browse files Browse the repository at this point in the history
MapMemory is not initialized by FindGuardedMemoryMap
or CoreInternalAllocatePages which calls MapMemory.
So we give a 0 to it.

Cc: Dandan Bi <[email protected]>
Cc: Liming Gao <[email protected]>
Signed-off-by: Shenglei Zhang <[email protected]>
Reviewed-by: Dandan Bi <[email protected]>
  • Loading branch information
shenglei10 authored and lgao4 committed Nov 4, 2019
1 parent a857ea4 commit 17efd44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ FindGuardedMemoryMap (
UINTN BitsToUnitEnd;
EFI_STATUS Status;

MapMemory = 0;

//
// Adjust current map table depth according to the address to access
//
Expand Down

0 comments on commit 17efd44

Please sign in to comment.