diff --git a/internal/exec/exec.go b/internal/exec/exec.go index 79463b3fb2..b40ea69467 100644 --- a/internal/exec/exec.go +++ b/internal/exec/exec.go @@ -209,8 +209,8 @@ func (e *Exec) Start() error { if err != nil { return fmt.Errorf("failed to create process: %w", err) } - // Don't need the thread handle for anything. defer func() { + _ = windows.CloseHandle(windows.Handle(pi.Process)) _ = windows.CloseHandle(windows.Handle(pi.Thread)) }()