From 9c8cee712dd47f405ca7d63aecfee59d91e9aadc Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 27 Apr 2010 18:48:11 -0700 Subject: [PATCH] net: fix bug in internetSocket introduced by error cleanup. Fixes #750. R=adg CC=golang-dev https://golang.org/cl/988043 --- src/pkg/net/ipsock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/net/ipsock.go b/src/pkg/net/ipsock.go index fcbd5079f7..3453aaab16 100644 --- a/src/pkg/net/ipsock.go +++ b/src/pkg/net/ipsock.go @@ -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