From: Filippo Valsorda Date: Fri, 30 Mar 2018 21:00:39 +0000 (-0400) Subject: syscall: remove double Unlock from Dup2 on nacl X-Git-Tag: go1.11beta1~1031 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=befd5c44cc5e970dd4b021229d6162d8b56f111b;p=gostls13.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 --- diff --git a/src/syscall/fd_nacl.go b/src/syscall/fd_nacl.go index e559793c8b..b31aa58c49 100644 --- a/src/syscall/fd_nacl.go +++ b/src/syscall/fd_nacl.go @@ -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