From f6ddcbefac8d80d2d00eff90a48bbcd44b041c0f Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Fri, 28 Aug 2020 17:18:43 -0700 Subject: Fix kernfs.Dentry reference leak. PiperOrigin-RevId: 329036994 --- pkg/sentry/socket/netstack/netstack_vfs2.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/sentry') 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{ -- cgit v1.2.3