diff options
Diffstat (limited to 'common/sampling.cpp')
-rw-r--r-- | common/sampling.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/sampling.cpp b/common/sampling.cpp index 673d67a6..1317024c 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -39,6 +39,7 @@ void llama_sampling_free(struct llama_sampling_context * ctx) { void llama_sampling_reset(llama_sampling_context * ctx) { if (ctx->grammar != NULL) { llama_grammar_free(ctx->grammar); + ctx->grammar = NULL; } if (!ctx->parsed_grammar.rules.empty()) { |