Explorar o código

Fix: do not close file on mmap (#1017)

slaren %!s(int64=2) %!d(string=hai) anos
pai
achega
47f61aaa5f
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  1. 0 1
      llama_util.h

+ 0 - 1
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));
         }