diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2020-08-28 17:18:43 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-28 17:20:17 -0700 |
commit | f6ddcbefac8d80d2d00eff90a48bbcd44b041c0f (patch) | |
tree | 36fcafb17a50fa673cf38d4a21820e5088d1ffe5 | |
parent | d3057717dcb7b6777aa4c20cac69babc7b545b5d (diff) |
Fix kernfs.Dentry reference leak.
PiperOrigin-RevId: 329036994
-rw-r--r-- | pkg/sentry/socket/netstack/netstack_vfs2.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/socket/netstack/netstack_vfs2.go b/pkg/sentry/socket/netstack/netstack_vfs2.go index 59fa4c58f..1f7d17f5f 100644 --- a/pkg/sentry/socket/netstack/netstack_vfs2.go +++ b/pkg/sentry/socket/netstack/netstack_vfs2.go @@ -56,6 +56,7 @@ func NewVFS2(t *kernel.Task, family int, skType linux.SockType, protocol int, qu mnt := t.Kernel().SocketMount() d := sockfs.NewDentry(t.Credentials(), mnt) + defer d.DecRef(t) s := &SocketVFS2{ socketOpsCommon: socketOpsCommon{ |