aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslaren <2141330+slaren@users.noreply.github.com>2023-04-16 21:27:38 +0200
committerGitHub <noreply@github.com>2023-04-16 21:27:38 +0200
commit47f61aaa5f76d04286792e2fbd0c95b659ab2af0 (patch)
treea662a865c8795a6b22839f212c20d5057b729c5e
parent3173a62eb9f90b94fb3184131032c1c8b7aa8d86 (diff)
Fix: do not close file on mmap (#1017)
-rwxr-xr-xllama_util.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/llama_util.h b/llama_util.h
index d2110eb..c92c0cc 100755
--- a/llama_util.h
+++ b/llama_util.h
@@ -176,7 +176,6 @@ struct llama_mmap {
flags |= MAP_POPULATE;
#endif
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
- close(fd);
if (addr == MAP_FAILED) {
throw format("mmap failed: %s", strerror(errno));
}