Fix refcount bug in rpcinet socketOperations.Accept.

PiperOrigin-RevId: 198931222
Change-Id: I69ee12318e87b9a6a4a94b18a9bf0ae4e39d7eaf
This commit is contained in:
Brian Geffon
2018-06-01 14:59:47 -07:00
committed by Shentubot
parent 659b10d1a6
commit 0212f222c7
+2
View File
@@ -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,