efi_loader: Do not leak memory when unlinking a mapping
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sat, 1 Oct 2016 21:32:29 +0000 (23:32 +0200)
committerAlexander Graf <agraf@suse.de>
Tue, 18 Oct 2016 07:08:08 +0000 (09:08 +0200)
commit511d0b97ef709d13da4922fb694d55ef9a5ef641
tree19fdb61edb3780ea70efa16b418fad2143dde9a2
parentb6a951727504d4159467ac98434849f81aaf9ffa
efi_loader: Do not leak memory when unlinking a mapping

As soon as a mapping is unlinked from the list, there are no further
references to it, so it should be freed. If it not unlinked,
update the start address and length.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_memory.c