net: fix bug in internetSocket introduced by error cleanup.

Fixes #750.

R=adg
CC=golang-dev
https://golang.org/cl/988043
This commit is contained in:
Russ Cox 2010-04-27 18:48:11 -07:00
parent f5b3c14f31
commit 9c8cee712d
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ func internetSocket(net string, laddr, raddr sockaddr, proto int, mode string, t
}
}
fd, oserr = socket(net, family, proto, 0, la, ra, toAddr)
if err != nil {
if oserr != nil {
goto Error
}
return fd, nil