diff options
author | slaren <2141330+slaren@users.noreply.github.com> | 2023-04-16 21:27:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-16 21:27:38 +0200 |
commit | 47f61aaa5f76d04286792e2fbd0c95b659ab2af0 (patch) | |
tree | a662a865c8795a6b22839f212c20d5057b729c5e | |
parent | 3173a62eb9f90b94fb3184131032c1c8b7aa8d86 (diff) |
Fix: do not close file on mmap (#1017)
-rwxr-xr-x | llama_util.h | 1 |
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)); } |