commit | 7d3af58ed9aa84175ed92a901db558f443b33e46 | [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 | 96aa99cded0096bd6c6ea2919e6884c54c80f095 [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>