mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
16112f9f48
commit
0e18f584de
3 changed files with 72 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue