aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-12-03 21:02:03 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-12-06 14:29:49 -0700
commitca974de5217dbb7a638bd711df18fe9148383d3c (patch)
tree9b58e10d48b83c7580d21c4aa9f9959a4e63cee1 /src/Module.zig
parent003bba47ccd0b57e20192b6123b1be643f35da83 (diff)
downloadzig-ca974de5217dbb7a638bd711df18fe9148383d3c.tar.gz
zig-ca974de5217dbb7a638bd711df18fe9148383d3c.zip
stage2: fix double-free when error reading cached ZIR
We already had a `keep_zir` flag. No need to call deinit manually.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 7fa91486d3..b8e5867775 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -2622,7 +2622,6 @@ pub fn astGenFile(mod: *Module, file: *File) !void {
zir.extra.len * 4;
if (amt_read != amt_expected) {
log.warn("unexpected EOF reading cached ZIR for {s}", .{file.sub_file_path});
- zir.deinit(gpa);
break :cached;
}
if (data_has_safety_tag) {