From e4ca946c48ee6e1a848cf88e5f81680179b0fbf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=BA?= Date: Fri, 15 Nov 2024 08:31:01 +0800 Subject: [PATCH] free omni_ctx heap malloc space in omni_free() api Currently mem leaks in qwen2audio are almost fixed. --- examples/qwen2-audio/qwen2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/qwen2-audio/qwen2.cpp b/examples/qwen2-audio/qwen2.cpp index ad6a199c7..8a08a7ac6 100644 --- a/examples/qwen2-audio/qwen2.cpp +++ b/examples/qwen2-audio/qwen2.cpp @@ -724,6 +724,7 @@ void omni_free(struct omni_context *ctx_omni) llama_free(ctx_omni->ctx_llama); llama_free_model(ctx_omni->model); 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)