Skip to content

Fix process resource leak#32

Merged
kimkulling merged 1 commit intomainfrom
bugfix/kk/fix_resource_leak_issue-31
Apr 14, 2026
Merged

Fix process resource leak#32
kimkulling merged 1 commit intomainfrom
bugfix/kk/fix_resource_leak_issue-31

Conversation

@kimkulling
Copy link
Copy Markdown
Owner

@kimkulling kimkulling commented Apr 14, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved file dialog error handling on non-Windows platforms to ensure system resources are properly managed and errors are correctly detected.

@sonarqubecloud
Copy link
Copy Markdown

@kimkulling kimkulling added the bug Something isn't working label Apr 14, 2026
@kimkulling kimkulling merged commit 3149343 into main Apr 14, 2026
3 of 4 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a0c8fc6a-83f4-4f2d-9251-a55b31d0d7a5

📥 Commits

Reviewing files that changed from the base of the PR and between 9d6dc59 and 14a855a.

📒 Files selected for processing (1)
  • src/widgets.cpp

Walkthrough

Added pclose() calls to properly close file dialog pipes after fgets() in non-Windows implementations of file dialog functions. The functions now check the return status and return ErrorCode if pipe closure fails.

Changes

Cohort / File(s) Summary
File Dialog Pipe Cleanup
src/widgets.cpp
Added missing pclose() calls in getOpenFileDialog and getSaveFileDialog for non-Windows implementations. Functions now check pipe closure status and return ErrorCode on failure instead of silently using potentially corrupted data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/kk/fix_resource_leak_issue-31

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: pclose is missing

1 participant