Skip to content

Commit

Permalink
Close piClient.hThread handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Oct 3, 2024
1 parent 796e11e commit d2bf81f
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 d2bf81f

Please sign in to comment.