aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_bootmgr.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-12-24 09:19:07 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-02-16 15:42:20 +0100
commit0e18f584de59a86aaf86bd328dbd16fbd0175b3d (patch)
treed369cbcbda945fc94d983d85c488fb0726e4f44b /lib/efi_loader/efi_bootmgr.c
parent16112f9f4832761e6af6f5ddb74c77a107992cb7 (diff)
downloadu-boot-0e18f584de59a86aaf86bd328dbd16fbd0175b3d.zip
u-boot-0e18f584de59a86aaf86bd328dbd16fbd0175b3d.tar.gz
u-boot-0e18f584de59a86aaf86bd328dbd16fbd0175b3d.tar.bz2
efi_loader: LoadImage: always allocate new pages
If we want to properly unload images in Exit() the memory should always be allocated in the same way. As we allocate memory when reading from file we should do the same when the original image is in memory. A further patch will be needed to free the memory when Exit() is called. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_bootmgr.c')
-rw-r--r--lib/efi_loader/efi_bootmgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index a095df3..196116b 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -150,7 +150,7 @@ static void *try_load_entry(uint16_t n, struct efi_device_path **device_path,
debug("%s: trying to load \"%ls\" from %pD\n",
__func__, lo.label, lo.file_path);
- ret = efi_load_image_from_path(lo.file_path, &image);
+ ret = efi_load_image_from_path(lo.file_path, &image, &size);
if (ret != EFI_SUCCESS)
goto error;