From e7c41036e45a0c06adff3b86fcde2baf7381907a Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Sat, 22 Aug 2026 14:17:10 +0000 Subject: core: hash: Unmap file data after hashing Signed-off-by: Chloe M. --- core/hash.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/hash.c') diff --git a/core/hash.c b/core/hash.c index 557e406..17a8fa3 100644 --- a/core/hash.c +++ b/core/hash.c @@ -50,5 +50,8 @@ bop_hash_file(const char *path, char hashres[BOP_HASH_LEN]) for (i = 0; i < SHA256_DIGEST_LENGTH; ++i) { sprintf((char *)hashres + i*2, "%02X", hash[i]); } + + munmap(mem, len); + close(fd); return 0; } -- cgit v1.2.3