diff --git a/examples/qwen2-audio/qwen2.cpp b/examples/qwen2-audio/qwen2.cpp index 71b2a4a12..a42b85bdc 100644 --- a/examples/qwen2-audio/qwen2.cpp +++ b/examples/qwen2-audio/qwen2.cpp @@ -18,6 +18,7 @@ #include #include #include +#include // // Constants @@ -708,6 +709,7 @@ void omni_free(struct omni_context *ctx_omni) if(internal_chars != nullptr) { free(internal_chars); + internal_chars = nullptr; } if (ctx_omni->ctx_whisper) { @@ -716,7 +718,7 @@ void omni_free(struct omni_context *ctx_omni) } if (ctx_omni->projector) { - ctx_omni->projector->free(); + delete ctx_omni->projector; } llama_free(ctx_omni->ctx_llama);