diff options
author | Nayana Bidari <nybidari@google.com> | 2020-09-01 13:38:44 -0700 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-09-09 17:53:10 -0700 |
commit | 6b992edc8ab85070f50a6860b936b6cef82d48f8 (patch) | |
tree | 6e69b1d2295a85722e3b63103b3d6dff02e286a0 /pkg/sentry/syscalls/linux/vfs2/socket.go | |
parent | 114d1268b26e71c99fabb9d5b13d7c95c7c5c34b (diff) |
Fix panic when calling dup2().
PiperOrigin-RevId: 329572337
Diffstat (limited to 'pkg/sentry/syscalls/linux/vfs2/socket.go')
-rw-r--r-- | pkg/sentry/syscalls/linux/vfs2/socket.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/socket.go b/pkg/sentry/syscalls/linux/vfs2/socket.go index a5032657a..a15dad29f 100644 --- a/pkg/sentry/syscalls/linux/vfs2/socket.go +++ b/pkg/sentry/syscalls/linux/vfs2/socket.go @@ -252,7 +252,7 @@ func SocketPair(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sy if _, err := t.CopyOut(addr, fds); err != nil { for _, fd := range fds { - if _, file := t.FDTable().Remove(fd); file != nil { + if _, file := t.FDTable().Remove(t, fd); file != nil { file.DecRef(t) } } |