From 1102ff56db40e4703e8ae1dc1a0244be08e3614e Mon Sep 17 00:00:00 2001 From: slaren Date: Mon, 17 Jul 2023 12:00:17 +0200 Subject: [PATCH] fix double-free with --no-mmap --- llama.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/llama.cpp b/llama.cpp index 54b891774..61e31f45f 100644 --- a/llama.cpp +++ b/llama.cpp @@ -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); } }