llama: fix memory leak for grammar (#10696)

This commit is contained in:
Parth Sareen 2025-05-13 15:39:27 -07:00 committed by Ryan Schumacher
parent 24118aa1db
commit d0ed25bde8
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -114,6 +114,9 @@ void grammar_free(struct llama_grammar *g) {
if (g->vocab != nullptr) {
delete g->vocab;
}
if (g->o_vocab != nullptr) {
delete g->o_vocab;
}
llama_grammar_free_impl(g);
}
}