summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChloe M. <chloe@aptel.org>2026-08-22 14:17:10 +0000
committerChloe M. <chloe@aptel.org>2026-08-22 14:17:49 +0000
commite7c41036e45a0c06adff3b86fcde2baf7381907a (patch)
tree5bf306641dc86347c7203b454f065aac1cbf4687 /core
parent6f8fca6963cfc70e9dfb30155c3276e9f5279c58 (diff)
core: hash: Unmap file data after hashing
Signed-off-by: Chloe M. <chloe@aptel.org>
Diffstat (limited to 'core')
-rw-r--r--core/hash.c3
1 files changed, 3 insertions, 0 deletions
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;
}