Skip to content

Commit ef89483

Browse files
committed
fix memory leak when modified document exceeds maximum file size
Casually leaking at least 4GiB of memory...
1 parent e208887 commit ef89483

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Server.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ fn changeDocumentHandler(server: *Server, _: std.mem.Allocator, notification: ty
11571157
new_text.len,
11581158
DocumentStore.max_document_size,
11591159
});
1160+
server.allocator.free(new_text);
11601161
return error.InternalError;
11611162
}
11621163

0 commit comments

Comments
 (0)