Skip to content

servers: fix HANDLE leak in UWP builds - #22489

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:uwp-handle-leak
Closed

vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:uwp-handle-leak

Conversation

@vszakats

@vszakats vszakats commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Also: shorten code.

Reported by Copilot
Bug: #22487 (review)

@vszakats vszakats added tests Windows Windows-specific labels Aug 5, 2026
@vszakats
vszakats requested a lite review from Copilot August 5, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Windows-only resource leak in the test server utilities by ensuring the Win32 exit_event HANDLE is closed during signal-handler teardown, including in UWP builds where the previous cleanup path was skipped.

Changes:

  • Close exit_event in restore_signal_handlers() for all _WIN32 builds (not gated by CURL_WINDOWS_UWP).
  • Slightly shortens/simplifies the cleanup logic into a single conditional.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats changed the title servers: fix HANDLE leak in UWP builds servers: fix HANDLE leak on exit in UWP builds Aug 5, 2026
@vszakats vszakats changed the title servers: fix HANDLE leak on exit in UWP builds servers: fix HANDLE leak in UWP builds Aug 5, 2026
@vszakats vszakats closed this in 7babac8 Aug 5, 2026
@vszakats
vszakats deleted the uwp-handle-leak branch August 5, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants