Skip to content

fix(cloud-tools): add defer free for stdout allocation#176

Merged
gHashTag merged 1 commit into
mainfrom
feat/issue-173
Mar 11, 2026
Merged

fix(cloud-tools): add defer free for stdout allocation#176
gHashTag merged 1 commit into
mainfrom
feat/issue-173

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

  • Add defer std.heap.page_allocator.free(stdout) after readToEndAlloc in runTriCloud() function
  • Fixes memory leak that occurred on every MCP tool call in cloud_tools.zig

Test plan

  • zig fmt passes on edited file
  • Code change is minimal (1 line addition)
  • Follows Zig memory management best practices

Closes #173

🤖 Generated with Claude Code

Add defer std.heap.page_allocator.free(stdout) after readToEndAlloc
to fix memory leak in runTriCloud() function that occurred on every
MCP tool call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gHashTag gHashTag merged commit afaf17c into main Mar 11, 2026
4 of 6 checks passed
gHashTag added a commit that referenced this pull request Mar 18, 2026
fix(cloud-tools): add defer free for stdout allocation
@gHashTag gHashTag deleted the feat/issue-173 branch April 3, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cloud-tools): add defer free for stdout allocation in cloud_tools.zig

1 participant