Skip to content

Commit 47f61aa

Browse files
authored
Fix: do not close file on mmap (#1017)
1 parent 3173a62 commit 47f61aa

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

llama_util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ struct llama_mmap {
176176
flags |= MAP_POPULATE;
177177
#endif
178178
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
179-
close(fd);
180179
if (addr == MAP_FAILED) {
181180
throw format("mmap failed: %s", strerror(errno));
182181
}

0 commit comments

Comments
 (0)