From 781a0308f43c118e9e94b57140c1ec92a0768a67 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 13 Apr 2023 14:20:03 +0800 Subject: [PATCH] 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(+) 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; } -- 2.39.5