From 3b4674ffe0e6ef1b016333ee726293ecf70c4e4e Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Wed, 28 Oct 2020 18:16:30 -0700 Subject: Add logging option to leak checker. Also refactor the template and CheckedObject interface to make this cleaner. Updates #1486. PiperOrigin-RevId: 339577120 --- pkg/sentry/fsimpl/gofer/directory.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pkg/sentry/fsimpl/gofer/directory.go') diff --git a/pkg/sentry/fsimpl/gofer/directory.go b/pkg/sentry/fsimpl/gofer/directory.go index e993c8e36..ce1b2a390 100644 --- a/pkg/sentry/fsimpl/gofer/directory.go +++ b/pkg/sentry/fsimpl/gofer/directory.go @@ -101,9 +101,7 @@ func (d *dentry) createSyntheticChildLocked(opts *createSyntheticOpts) { hostFD: -1, nlink: uint32(2), } - if refsvfs2.LeakCheckEnabled() { - refsvfs2.Register(child, "gofer.dentry") - } + refsvfs2.Register(child) switch opts.mode.FileType() { case linux.S_IFDIR: // Nothing else needs to be done. -- cgit v1.2.3