Skip to content

Commit

Permalink
Merge pull request #718 from microsoft/tyriar/717
Browse files Browse the repository at this point in the history
Close piClient.hThread handle
  • Loading branch information
Tyriar authored Oct 3, 2024
2 parents 1ece036 + d2bf81f commit b2d9866
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/win/conpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,9 @@ static Napi::Value PtyConnect(const Napi::CallbackInfo& info) {
// Update handle
handle->hShell = piClient.hProcess;

// Close the thread handle to avoid resource leak
CloseHandle(piClient.hThread);

SetupExitCallback(env, exitCallback, handle);

// Return
Expand Down

0 comments on commit b2d9866

Please sign in to comment.