]> git.ipfire.org Git - thirdparty/u-boot.git/commit
efi_loader: release file buffer after loading image
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 4 Mar 2019 16:50:05 +0000 (17:50 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 7 Apr 2019 12:17:06 +0000 (14:17 +0200)
commitb0c3c346c6d7ec44363037ad55fdfad4c3b474d1
tree10956d728a09195f3c1d3e866aa901cbb1219786
parent0e62d5b2abb69ddc9e58215e2d8dfa5d33996b8a
efi_loader: release file buffer after loading image

Commit 0e18f584de59 ("efi_loader: LoadImage: always allocate new pages")
ensured that whether we load an image from file or from memory we end up
with the same number of newly allocated buffers. But essentially we ended
up with one buffer too many in both cases:

efi_load_pe() copies and rebases the UEFI image.
We do not need the buffer with the file contents afterwards.

Fixes: 0e18f584de59 ("efi_loader: LoadImage: always allocate new pages")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_boottime.c