summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/host/socket.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-09-30 18:25:06 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-30 18:25:06 -0700
commitcb41f6703160dcb18242cd912db86983540af595 (patch)
treee8e6c5a6dd821c0e841949c6a1de04d18047fc30 /pkg/sentry/fsimpl/host/socket.go
parentae51aef5bb31458a98c7f27546213a7d2bdff504 (diff)
parentd5f20209cc34a5357486a2f495bfe30b5d6e2056 (diff)
Merge pull request #3824 from btw616:fix/issue-3823
PiperOrigin-RevId: 334721453
Diffstat (limited to 'pkg/sentry/fsimpl/host/socket.go')
-rw-r--r--pkg/sentry/fsimpl/host/socket.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/host/socket.go b/pkg/sentry/fsimpl/host/socket.go
index 131145b85..8a447e29f 100644
--- a/pkg/sentry/fsimpl/host/socket.go
+++ b/pkg/sentry/fsimpl/host/socket.go
@@ -348,10 +348,10 @@ func (e *SCMConnectedEndpoint) Init() error {
func (e *SCMConnectedEndpoint) Release(ctx context.Context) {
e.DecRef(func() {
e.mu.Lock()
+ fdnotifier.RemoveFD(int32(e.fd))
if err := syscall.Close(e.fd); err != nil {
log.Warningf("Failed to close host fd %d: %v", err)
}
- fdnotifier.RemoveFD(int32(e.fd))
e.destroyLocked()
e.mu.Unlock()
})