]> Cypherpunks repositories - gostls13.git/commit
os/exec: fix fd leak with Std*Pipe + LookPath
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 18 Mar 2013 16:52:39 +0000 (09:52 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 18 Mar 2013 16:52:39 +0000 (09:52 -0700)
commit9db0583007e1f644b16d957c2e567ad5e5922338
tree8a404141887fcefdec7a3f2d2d5db93cb5af3ca6
parent7f50c23e2d18c445bfe790692e998ff91b37ddc2
os/exec: fix fd leak with Std*Pipe + LookPath

If LookPath in Command fails, sets a sticky error, and then
StdinPipe, StdoutPipe, or StderrPipe were called, those pipe
fds were never cleaned up.

Fixes #5071

R=golang-dev, rogpeppe
CC=golang-dev
https://golang.org/cl/7799046
src/pkg/os/exec/exec.go
src/pkg/os/exec/exec_test.go