summaryrefslogtreecommitdiff
path: root/tools/prelink-riscv.c
diff options
context:
space:
mode:
authorBin Meng <bmeng@tinylab.org>2023-04-13 14:20:03 +0800
committerLeo Yu-Chi Liang <ycliang@andestech.com>2023-04-20 20:45:08 +0800
commit781a0308f43c118e9e94b57140c1ec92a0768a67 (patch)
treeda16ab8ac522e4dab0b4ab2b90a9ad5345bb8743 /tools/prelink-riscv.c
parentfb3cc482dad2796398dca4de3ca9d4065f1273ee (diff)
downloadu-boot-781a0308f43c118e9e94b57140c1ec92a0768a67.tar.gz
u-boot-781a0308f43c118e9e94b57140c1ec92a0768a67.tar.bz2
u-boot-781a0308f43c118e9e94b57140c1ec92a0768a67.zip
tools: prelink-riscv: Unmap the ELF image when done
The codes forget to call munmap() to unmap the ELF image that was mapped by previous mmap(). Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'tools/prelink-riscv.c')
-rw-r--r--tools/prelink-riscv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/prelink-riscv.c b/tools/prelink-riscv.c
index b0467949eb..43d6412ee9 100644
--- a/tools/prelink-riscv.c
+++ b/tools/prelink-riscv.c
@@ -118,5 +118,7 @@ int main(int argc, const char *const *argv)
prelink_le32(data);
}
+ munmap(data, st.st_size);
+
return 0;
}