common: free ctx_gguf when exiting llama_control_vector_load_one

ctx_gguf is initialized by gguf_init_from_file. It appears to be otherwise
unused throughout the function. Someone more familar with the code might
want to consider if gguf_init_from_file is necessary at all. But in the
mean time, free the context when exiting so we don't leak memory.
This commit is contained in:
Steve Grubb 2024-05-14 10:05:26 -04:00
parent 1265c670fd
commit 4d646f8f13

View file

@ -2977,6 +2977,8 @@ static llama_control_vector_data llama_control_vector_load_one(const llama_contr
} }
} }
gguf_free(ctx_gguf);
return result; return result;
} }