fix mem leakage based on leaks tool (still WIP)

This commit is contained in:
李为 2024-11-14 22:04:01 +08:00
parent aad0167bc3
commit 8e2e630405
2 changed files with 4 additions and 1 deletions

View file

@ -150,6 +150,7 @@ bool load_hparams_and_tensors_from_gguf(const std::string &fname, NexaBaseModel
}
ggml_free(meta);
gguf_free(ctx_gguf);
return true;
}

View file

@ -9467,6 +9467,8 @@ static bool whisper_encoder_load(struct whisper_model_loader *loader, whisper_co
wctx.t_load_us = ggml_time_us() - t_start_us;
gguf_free(gguf_ctx);
return true;
}