From 781a0308f43c118e9e94b57140c1ec92a0768a67 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 13 Apr 2023 14:20:03 +0800 Subject: 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 Reviewed-by: Rick Chen --- tools/prelink-riscv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/prelink-riscv.c') diff --git a/tools/prelink-riscv.c b/tools/prelink-riscv.c index b046794..43d6412 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; } -- cgit v1.1