Do not close file after mmap (Windows version) (#1034)

This commit is contained in:
Ivan Komarov 2023-04-18 03:15:50 +02:00 committed by GitHub
parent e9298af389
commit 42747220b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,7 +202,6 @@ struct llama_mmap {
HANDLE hMapping = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
DWORD error = GetLastError();
CloseHandle(hFile);
if (hMapping == NULL) {
throw format("CreateFileMappingA failed: %s", llama_format_win_err(error).c_str());