Skip to content

Commit 1b591df

Browse files
committed
os/exec: fix variable shadow, don't leak goroutine
Goroutine leak checking is still too tedious, so untested. See #6705 which is my fault for forgetting to mail out. Change-Id: I899fb311c9d4229ff1dbd3f54fe307805e17efee Reviewed-on: https://go-review.googlesource.com/22581 Reviewed-by: Ahmed W. <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 6c11e27 commit 1b591df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/os/exec/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ func (c *Cmd) WaitContext(ctx context.Context) error {
412412

413413
var waitDone chan struct{}
414414
if ctx != nil {
415-
waitDone := make(chan struct{})
415+
waitDone = make(chan struct{})
416416
go func() {
417417
select {
418418
case <-ctx.Done():

0 commit comments

Comments
 (0)