Skip to content

Commit befd5c4

Browse files
FiloSottilebradfitz
authored andcommitted
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 <[email protected]>
1 parent a9ba3e3 commit befd5c4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/syscall/fd_nacl.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ func Dup(fd int) (int, error) {
121121

122122
func Dup2(fd, newfd int) error {
123123
files.Lock()
124-
defer files.Unlock()
125124
if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil || newfd < 0 || newfd >= len(files.tab)+100 {
126125
files.Unlock()
127126
return EBADF

0 commit comments

Comments
 (0)