fix double-free with --no-mmap

This commit is contained in:
slaren 2023-07-17 12:00:17 +02:00
parent 4e94af3060
commit 1102ff56db

View File

@ -650,8 +650,6 @@ struct llama_model_loader {
// hint the OS that we don't need the data anymore
// TODO: this may be a bad idea with devices that use the system memory (Metal?)
mapping->discard(lt.data, lt.size);
} else {
free(lt.data);
}
}