From 6689835c1edf7936287c62241f25def6b1187f29 Mon Sep 17 00:00:00 2001 From: Trinity Agent Date: Wed, 11 Mar 2026 18:51:12 +0000 Subject: [PATCH] fix(state): add missing child.deinit() in runProcessInherit (#165) Process resources were leaking due to missing deinit() call after std.process.Child.init(). Added defer child.deinit() to ensure proper cleanup. Co-Authored-By: Claude Opus 4.6 --- src/tri/tri_state.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tri/tri_state.zig b/src/tri/tri_state.zig index 8701a4ed87..782e17a7a0 100644 --- a/src/tri/tri_state.zig +++ b/src/tri/tri_state.zig @@ -33,6 +33,7 @@ pub fn runProcessAndCapture(allocator: std.mem.Allocator, argv: []const []const /// Run a subprocess, inherit stdio, return exit code pub fn runProcessInherit(allocator: std.mem.Allocator, argv: []const []const u8) !u8 { var child = std.process.Child.init(argv, allocator); + defer child.deinit(); child.stdout_behavior = .Inherit; child.stderr_behavior = .Inherit; _ = try child.spawn();