mirror of
https://github.com/golang/go
synced 2024-11-12 09:10:21 -07:00
net: Remove an unmatched unlock of ForkLock
Remove an RUnlock of syscall.ForkLock with no matching RLock. Holding ForkLock in netFD.dup is unnecessary: dupCloseOnExecOld locks and unlocks the lock on its own and dupCloseOnExec doesn't need the ForkLock to be held. LGTM=iant R=golang-codereviews, bradfitz, iant CC=golang-codereviews https://golang.org/cl/99800044
This commit is contained in:
parent
9d7b9fb7d0
commit
4c129c083b
@ -482,7 +482,6 @@ func dupCloseOnExecOld(fd int) (newfd int, err error) {
|
||||
func (fd *netFD) dup() (f *os.File, err error) {
|
||||
ns, err := dupCloseOnExec(fd.sysfd)
|
||||
if err != nil {
|
||||
syscall.ForkLock.RUnlock()
|
||||
return nil, &OpError{"dup", fd.net, fd.laddr, err}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user