commit | 3e4b4c4e2a490bd6220b3d7520e924aa0a8f15bf | [log] [tgz] |
---|---|---|
author | Bin Meng <bmeng@tinylab.org> | Thu Apr 13 14:20:03 2023 +0800 |
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | Thu Apr 20 20:45:08 2023 +0800 |
tree | da16ab8ac522e4dab0b4ab2b90a9ad5345bb8743 | |
parent | 0320d52809500aecd890e11cc754a9cde1749560 [diff] |
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>
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 @@ prelink_le32(data); } + munmap(data, st.st_size); + return 0; }