free omni_ctx heap malloc space in omni_free() api

Currently mem leaks in qwen2audio are almost fixed.
This commit is contained in:
李为 2024-11-15 08:31:01 +08:00
parent 8e2e630405
commit e4ca946c48

View file

@ -724,6 +724,7 @@ void omni_free(struct omni_context *ctx_omni)
llama_free(ctx_omni->ctx_llama); llama_free(ctx_omni->ctx_llama);
llama_free_model(ctx_omni->model); llama_free_model(ctx_omni->model);
llama_backend_free(); llama_backend_free();
free(ctx_omni);
} }
static bool omni_eval_audio_embed(llama_context *ctx_llama, ggml_tensor *audio_embed, int n_batch, int *n_past) static bool omni_eval_audio_embed(llama_context *ctx_llama, ggml_tensor *audio_embed, int n_batch, int *n_past)