commit | ac7f842aa4aec1146f2f043a8946fc681dc7d4aa | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | Fri May 10 21:21:30 2019 +0200 |
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | Sun May 12 20:54:22 2019 +0200 |
tree | c6fe2338c0f0874e783fb94d745dee25bd3edbe1 | |
parent | fdeb1f01f4e302ad32ddd094d92fde343405b2be [diff] |
efi_loader: check memory address before freeing When we call FreePages() we essentially add memory to our memory map. We shouldn't do this for memory that does not exit. Check if the memory that is to be freed via FreePages() or FreePool() is in our memory map and is not EFI_CONVENTIONAL_MEMORY. This check is mandated by the UEFI specification. Cf. UEFI SCT II (2017), 3.2.2 FreePages(), 5.1.2.1 - 5.1.2.2 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>