Skip to content
Commit 7d3af58e authored by Heinrich Schuchardt's avatar Heinrich Schuchardt
Browse files

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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent 96aa99cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment