MdeModulePkg/Core: fix guard page missing issue
authorJian J Wang <jian.j.wang@intel.com>
Fri, 26 Jan 2018 11:47:14 +0000 (19:47 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 2 Feb 2018 01:50:15 +0000 (09:50 +0800)
commit1263ecf2ffc9302663a304e7a6467c6e00cebf4a
tree3a8522bd89578dcfc306250a286a0e9cfd320584
parent821807bcefb9a36e598d71a8004fae5aab2052a0
MdeModulePkg/Core: fix guard page missing issue

This issue is a regression one caused by a patch at

    425d25699be83c35e12df8470b827d7fbcef3bce

That fix didn't take the 0 page to free into account, which still
needs to call UnsetGuardPage() even no memory needs to free.

The fix is just moving the calling of UnsetGuardPage() to the place
right after calling AdjustMemoryF().

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
MdeModulePkg/Core/Dxe/Mem/Pool.c