瀏覽代碼

server : free llama_batch on exit (#7212)

* [server] Cleanup a memory leak on exit

There are a couple memory leaks on exit of the server. This hides others.
After cleaning this up, you can see leaks on slots. But that is another
patch to be sent after this.

* make tab into spaces
Steve Grubb 1 年之前
父節點
當前提交
988631335a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      examples/server/server.cpp

+ 2 - 0
examples/server/server.cpp

@@ -673,6 +673,8 @@ struct server_context {
             llama_free_model(model);
             model = nullptr;
         }
+
+        llama_batch_free(batch);
     }
 
     bool load_model(const gpt_params & params_) {