mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix refcount bug in rpcinet socketOperations.Accept.
PiperOrigin-RevId: 198931222 Change-Id: I69ee12318e87b9a6a4a94b18a9bf0ae4e39d7eaf
This commit is contained in:
@@ -277,8 +277,10 @@ func (s *socketOperations) Accept(t *kernel.Task, peerRequested bool, flags int,
|
||||
file := fs.NewFile(t, dirent, fs.FileFlags{Read: true, Write: true, NonBlocking: flags&linux.SOCK_NONBLOCK != 0}, &socketOperations{
|
||||
wq: &wq,
|
||||
fd: payload.Fd,
|
||||
rpcConn: s.rpcConn,
|
||||
notifier: s.notifier,
|
||||
})
|
||||
defer file.DecRef()
|
||||
|
||||
fdFlags := kernel.FDFlags{
|
||||
CloseOnExec: flags&linux.SOCK_CLOEXEC != 0,
|
||||
|
||||
Reference in New Issue
Block a user