server: error handling: fix double free of ctx_sampling
This commit is contained in:
parent
444f32e370
commit
a4f25f8793
1 changed files with 1 additions and 0 deletions
|
@ -958,6 +958,7 @@ struct server_context {
|
||||||
{
|
{
|
||||||
if (slot.ctx_sampling != nullptr) {
|
if (slot.ctx_sampling != nullptr) {
|
||||||
llama_sampling_free(slot.ctx_sampling);
|
llama_sampling_free(slot.ctx_sampling);
|
||||||
|
slot.ctx_sampling = nullptr;
|
||||||
}
|
}
|
||||||
slot.ctx_sampling = llama_sampling_init(slot.sparams);
|
slot.ctx_sampling = llama_sampling_init(slot.sparams);
|
||||||
llama_set_rng_seed(ctx, slot.params.seed);
|
llama_set_rng_seed(ctx, slot.params.seed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue