efi: Free malloc regions on exit

When we exit grub, we don't free all the memory that we allocated earlier
for our heap region. This can cause problems with setups where you try
to descend the boot order using "exit" entries, such as PXE -> HD boot
scenarios.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Alexander Graf 2017-08-31 16:40:19 +02:00 committed by Daniel Kiper
parent 0ba90a7f01
commit 92bfc33db9
3 changed files with 84 additions and 0 deletions

View file

@ -80,4 +80,5 @@ grub_efi_fini (void)
{
grub_efidisk_fini ();
grub_console_fini ();
grub_efi_memory_fini ();
}