efi: Free malloc regions on exit
authorAlexander Graf <agraf@suse.de>
Thu, 31 Aug 2017 14:40:19 +0000 (16:40 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 7 Sep 2017 21:35:01 +0000 (23:35 +0200)
commit92bfc33db984eec22966a163eed7b6f2ab0266bf
tree1bd6b6637098445b6044324c4a69ee1f5e9327b6
parent0ba90a7f017889d32a47897d9107ef45cc50a049
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>
grub-core/kern/efi/init.c
grub-core/kern/efi/mm.c
include/grub/efi/efi.h