]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
MdeModulePkg/Core: add freed-memory guard feature
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Misc / MemoryProtection.c
index fa8f8fe91ac7a8e9f7f5e9805bf2ac63c77f4d5e..6298b67db1676288d80db4a92001665993968bef 100644 (file)
@@ -1250,7 +1250,7 @@ ApplyMemoryProtectionPolicy (
   // Don't overwrite Guard pages, which should be the first and/or last page,\r
   // if any.\r
   //\r
-  if (IsHeapGuardEnabled ()) {\r
+  if (IsHeapGuardEnabled (GUARD_HEAP_TYPE_PAGE|GUARD_HEAP_TYPE_POOL)) {\r
     if (IsGuardPage (Memory))  {\r
       Memory += EFI_PAGE_SIZE;\r
       Length -= EFI_PAGE_SIZE;\r