diff --git a/lib/compiler/Maker/Step/InstallArtifact.zig b/lib/compiler/Maker/Step/InstallArtifact.zig index 00d787e3eb554724ca42226397d1f260e91dfeff..6f90157c38683adc7512a643f813e8ef1dc9d315 100644 --- a/lib/compiler/Maker/Step/InstallArtifact.zig +++ b/lib/compiler/Maker/Step/InstallArtifact.zig @@ -19,6 +19,7 @@ pub fn make( const step = maker.stepByIndex(step_index); const conf = &maker.scanned_config.configuration; const graph = maker.graph; + const gpa = maker.gpa; const arena = graph.arena; // TODO don't leak into process arena const io = graph.io; const conf_step = step_index.ptr(conf); @@ -100,7 +101,8 @@ pub fn make( }; defer src_dir.close(io); - var it = try src_dir.walk(arena); + var it = try src_dir.walk(gpa); + defer it.deinit(); next_entry: while (it.next(io) catch |err| switch (err) { error.Canceled, error.OutOfMemory => |e| return e, else => |e| return step.fail(maker, "failed to iterate directory {f}: {t}", .{ src_dir_path, e }),