From 61fa98065fffee306873072733b93840df1dd683 Mon Sep 17 00:00:00 2001 From: Alex Kladov Date: Wed, 11 Jan 2023 20:18:37 +0000 Subject: [PATCH] fix use after free (#911) --- src/DocumentStore.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index ec72988..0edaf1a 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -694,7 +694,7 @@ fn createDocument(self: *DocumentStore, uri: Uri, text: [:0]u8, open: bool) erro handle.associated_build_file = gop.key_ptr.*; break; } else if (handle.associated_build_file == null) { - handle.associated_build_file = build_file_uri; + handle.associated_build_file = gop.key_ptr.*; } } }