Commit befd5c44 authored by Filippo Valsorda's avatar Filippo Valsorda Committed by Brad Fitzpatrick

syscall: remove double Unlock from Dup2 on nacl

Fixes #24610

Change-Id: I76dee97db7cd77fe03e4a224f679a5efd061a2b5
Reviewed-on: https://go-review.googlesource.com/103775Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a9ba3e30
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment