Skip to content

Commit 8fbcc28

Browse files
Trinity Agentclaude
andcommitted
fix(mcp-client): add child.deinit() in spawn error path (#166)
When child.spawn() fails, the child process resources were leaking. Added child.deinit() call before the early return to properly clean up. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 907b37b commit 8fbcc28

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/tri-api/mcp_client.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ pub const McpManager = struct {
5757

5858
child.spawn() catch |err| {
5959
std.debug.print("[mcp] Failed to spawn {s}: {s}\n", .{ name, @errorName(err) });
60+
child.deinit();
6061
return 0;
6162
};
6263

0 commit comments

Comments
 (0)