diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-10 21:06:50 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:42:30 -0700 |
| commit | 404cbc36c52a50975a69e78da716f2258e5b1696 (patch) | |
| tree | 17450c6c9bbc400ca049a4a7361ae92574f0bad1 /src/InternPool.zig | |
| parent | 50bebb9e21c7e131522bec467b477ed7f55feb91 (diff) | |
| download | zig-404cbc36c52a50975a69e78da716f2258e5b1696.tar.gz zig-404cbc36c52a50975a69e78da716f2258e5b1696.zip | |
InternPool: fix deinit leaking inner maps
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index 92f1d1fad5..4c7b7016ea 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -1294,6 +1294,7 @@ pub fn deinit(ip: *InternPool, gpa: Allocator) void { ip.items.deinit(gpa); ip.extra.deinit(gpa); ip.limbs.deinit(gpa); + ip.string_bytes.deinit(gpa); ip.structs_free_list.deinit(gpa); ip.allocated_structs.deinit(gpa); @@ -1301,8 +1302,8 @@ pub fn deinit(ip: *InternPool, gpa: Allocator) void { ip.unions_free_list.deinit(gpa); ip.allocated_unions.deinit(gpa); + for (ip.maps) |*map| map.deinit(gpa); ip.maps.deinit(gpa); - ip.string_bytes.deinit(gpa); ip.* = undefined; } |
