EFI: further "need_to_free" adjustments
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Oct 2020 10:30:01 +0000 (12:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Oct 2020 10:30:01 +0000 (12:30 +0200)
commita8a85f03c826bea045e345fa405f187049d63584
tree3220d4ce24880359ca0f5b9f58e99569879b9a1f
parent44ac57af81ff8097e228895738b911ca819bda19
EFI: further "need_to_free" adjustments

When processing "chain" directives, the previously loaded config file
gets freed. This needs to be recorded accordingly such that no error
path would try to free the same block of memory a 2nd time.

Furthermore, neither .addr nor .size being zero has any meaning towards
the need to free an allocated chunk anymore. Drop (from read_file()) and
replace (in Arm's efi_arch_use_config_file(), to sensibly retain the
comment) respective assignments.

Fixes: 04be2c3a0678 ("efi/boot.c: add file.need_to_free")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/efi/efi-boot.h
xen/common/efi/boot.c