]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efi/libstub: Use cleanup helpers for freeing copies of the memory map
authorArd Biesheuvel <ardb@kernel.org>
Thu, 19 Dec 2024 14:30:39 +0000 (15:30 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 14 Jan 2025 07:35:27 +0000 (08:35 +0100)
commitad69b0b6f9954796875ee4faf6c16c9caca21999
tree76b025f3e4e516e8cd6ce3fd2702ac7728a76363
parent90534e689d2e52202c276ade5cf1dfc13d9e116f
efi/libstub: Use cleanup helpers for freeing copies of the memory map

The EFI stub may obtain the memory map from the firmware numerous times,
and this involves doing a EFI pool allocation first, which needs to be
freed after use.

Streamline this using a cleanup helper, which makes the code easier to
follow.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/kaslr.c
drivers/firmware/efi/libstub/mem.c
drivers/firmware/efi/libstub/randomalloc.c
drivers/firmware/efi/libstub/relocate.c
drivers/firmware/efi/libstub/x86-stub.c