common: clean up curl if file cannot be loaded in gguf

This commit is contained in:
Pierrick HYMBERT 2024-03-23 10:37:46 +01:00
parent 8187983e60
commit 3ba5f2d124

View file

@ -1946,6 +1946,7 @@ struct llama_model * llama_load_model_from_url(
auto * ctx_gguf = gguf_init_from_file(path_model, gguf_params); auto * ctx_gguf = gguf_init_from_file(path_model, gguf_params);
if (!ctx_gguf) { if (!ctx_gguf) {
fprintf(stderr, "\n%s: failed to load input GGUF from %s\n", __func__, path_model); fprintf(stderr, "\n%s: failed to load input GGUF from %s\n", __func__, path_model);
curl_easy_cleanup(curl);
return NULL; return NULL;
} }