From 5b022623cf7059b76d3bbc91c71a93ab96adbdeb Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 25 May 2026 20:17:41 -0700 Subject: [PATCH] Maker.Step.Compile: fix memory leak in checkCompileErrors --- lib/compiler/Maker/Step/Compile.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compiler/Maker/Step/Compile.zig b/lib/compiler/Maker/Step/Compile.zig index 75814a1e7bfdae19a12d6279978a6e6523a046ff..0b66dc282c801cd3cabff5c0a72e69cb36aab0c2 100644 --- a/lib/compiler/Maker/Step/Compile.zig +++ b/lib/compiler/Maker/Step/Compile.zig @@ -991,8 +991,9 @@ fn checkCompileErrors(arena: Allocator, maker: *Maker, step_index: Configuration const conf_comp = conf_step.extended.get(conf.extra).compile; // Clear this field so that it does not get printed by the build runner. - const actual_eb = step.result_error_bundle; + var actual_eb = step.result_error_bundle; step.result_error_bundle = .empty; + defer actual_eb.deinit(maker.gpa); const actual_errors = ae: { var aw: std.Io.Writer.Allocating = .init(arena); -- 2.54.0