summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichael Klimenko <mklimenko29@gmail.com>2024-01-27 15:25:55 +0100
committerGitHub <noreply@github.com>2024-01-27 15:25:55 +0100
commit35a2ee914308c85ab5cb576467381443ad23f0ac (patch)
tree72bd27fadddae5c8b82facf57373234822f574fc /common
parentec903c034131848da9222536ff18da07ec0882a0 (diff)
Remove unused data and add fixes (#5154)
* Remove unused data and add fixes * Add missing file * Address review comments * Replace the scope of vq allocation
Diffstat (limited to 'common')
-rw-r--r--common/sampling.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/sampling.cpp b/common/sampling.cpp
index efd7eab6..e8675a8c 100644
--- a/common/sampling.cpp
+++ b/common/sampling.cpp
@@ -13,6 +13,7 @@ struct llama_sampling_context * llama_sampling_init(const struct llama_sampling_
// will be empty (default) if there are parse errors
if (result->parsed_grammar.rules.empty()) {
fprintf(stderr, "%s: failed to parse grammar\n", __func__);
+ delete result;
return nullptr;
}