mirror of https://github.com/golang/go.git
syscall: remove double Unlock from Dup2 on nacl
Fixes #24610 Change-Id: I76dee97db7cd77fe03e4a224f679a5efd061a2b5 Reviewed-on: https://go-review.googlesource.com/103775 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
a9ba3e30ac
commit
befd5c44cc
|
|
@ -121,7 +121,6 @@ func Dup(fd int) (int, error) {
|
|||
|
||||
func Dup2(fd, newfd int) error {
|
||||
files.Lock()
|
||||
defer files.Unlock()
|
||||
if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil || newfd < 0 || newfd >= len(files.tab)+100 {
|
||||
files.Unlock()
|
||||
return EBADF
|
||||
|
|
|
|||
Loading…
Reference in New Issue