summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_memory.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-03 07:10:17 -0400
committerTom Rini <trini@konsulko.com>2019-05-03 07:10:17 -0400
commit6e25cfe9a475e8177bad7d9f97cffead6aab6b0d (patch)
tree2a74f7339892266a8d1d9afd812e9dad38ba0593 /lib/efi_loader/efi_memory.c
parent3570ea1f98229dc8c166dfc2693510db9167f7f8 (diff)
parent4ccf678f37731d8ec09eae8dca5f4cbe84132a52 (diff)
Merge tag 'efi-2019-07-rc2' of git://git.denx.de/u-boot-efi
Pull request for UEFI sub-system for v2019.07-rc2 This pull request provides error fixes for the handling of GPT partitions and for the UEFI subsystem.
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r--lib/efi_loader/efi_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 987cc6dc5f6..776077cc35a 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -452,7 +452,7 @@ efi_status_t efi_free_pages(uint64_t memory, efi_uintn_t pages)
uint64_t r = 0;
/* Sanity check */
- if (!memory || (memory & EFI_PAGE_MASK)) {
+ if (!memory || (memory & EFI_PAGE_MASK) || !pages) {
printf("%s: illegal free 0x%llx, 0x%zx\n", __func__,
memory, pages);
return EFI_INVALID_PARAMETER;