common: clean up curl if file cannot be loaded in gguf
This commit is contained in:
parent
8187983e60
commit
3ba5f2d124
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue