From 3ba5f2d1245bc149e2d27f104a425a63b77e664a Mon Sep 17 00:00:00 2001 From: Pierrick HYMBERT Date: Sat, 23 Mar 2024 10:37:46 +0100 Subject: [PATCH] common: clean up curl if file cannot be loaded in gguf --- common/common.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/common.cpp b/common/common.cpp index 0ce2aaab9..ef6771242 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1946,6 +1946,7 @@ struct llama_model * llama_load_model_from_url( auto * ctx_gguf = gguf_init_from_file(path_model, gguf_params); if (!ctx_gguf) { fprintf(stderr, "\n%s: failed to load input GGUF from %s\n", __func__, path_model); + curl_easy_cleanup(curl); return NULL; }