Skip to content

Commit 55991c9

Browse files
authored
Merge pull request #176 from gHashTag/feat/issue-173
fix(cloud-tools): add defer free for stdout allocation
2 parents c59ba7b + 5ab6cd4 commit 55991c9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/mcp/trinity_mcp/cloud_tools.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ fn runTriCloud(buf: *[MAX_OUTPUT]u8, args: []const []const u8) []const u8 {
8686
const stdout = child.stdout.?.readToEndAlloc(std.heap.page_allocator, MAX_OUTPUT) catch {
8787
return copyToBuf(buf, "Error: Failed to read output");
8888
};
89+
defer std.heap.page_allocator.free(stdout);
8990

9091
_ = child.wait() catch {};
9192

0 commit comments

Comments
 (0)