From ea3b0590ee33d3573eb8ef76f88cc60f36d2a38d Mon Sep 17 00:00:00 2001
From: dm4 <sunrisedm4@gmail.com>
Date: Wed, 15 May 2024 20:01:12 +0800
Subject: [PATCH] embedding : free the batch after execution (#7297)

---
 examples/embedding/embedding.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/embedding/embedding.cpp b/examples/embedding/embedding.cpp
index c85a2da53..0c921ed69 100644
--- a/examples/embedding/embedding.cpp
+++ b/examples/embedding/embedding.cpp
@@ -211,6 +211,7 @@ int main(int argc, char ** argv) {
 
     // clean up
     llama_print_timings(ctx);
+    llama_batch_free(batch);
     llama_free(ctx);
     llama_free_model(model);
     llama_backend_free();