Skip to content

Commit db4d6da

Browse files
committed
add constructor to initialize server_context::batch, preventing destructor's call to llama_batch_free from causing an invalid free()
1 parent 15e6125 commit db4d6da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/server/server.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,6 +1884,8 @@ struct server_context {
18841884

18851885
common_chat_templates_ptr chat_templates;
18861886

1887+
server_context() : batch({}) {
1888+
}
18871889
~server_context() {
18881890
mtmd_free(mctx);
18891891

0 commit comments

Comments
 (0)