git: 5001af647b3b - main - loader: Fix error handling after an allocation failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Jul 2026 00:41:01 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=5001af647b3b263aeb3d4fa7a6c2690399265202
commit 5001af647b3b263aeb3d4fa7a6c2690399265202
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-07-22 00:17:56 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-07-22 00:17:56 +0000
loader: Fix error handling after an allocation failure
MFC after: 1 week
---
stand/efi/loader/arch/amd64/elf64_freebsd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c
index 2ba5c1419168..592d553094ab 100644
--- a/stand/efi/loader/arch/amd64/elf64_freebsd.c
+++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c
@@ -163,7 +163,7 @@ elf64_exec(struct preloaded_file *fp)
(EFI_PHYSICAL_ADDRESS *)&PT4);
if (EFI_ERROR(err)) {
printf("Unable to allocate trampoline page table\n");
- BS->FreePages(trampcode, 9);
+ BS->FreePages(trampcode, 1);
if (copy_auto)
copy_staging = COPY_STAGING_AUTO;
return (ENOMEM);