1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:34:40 -07:00

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

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