diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-23 16:23:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-23 16:23:00 +0000 |
commit | 034e892a8555ed3e39737dee1d3d441f2412756d (patch) | |
tree | 7917e66d96b1be8a7fa2d94367098fce737ed4f2 /runsc | |
parent | 91d7460880c16fe0025540db48721c75d9609df3 (diff) | |
parent | 9ca66ec59882ea673a6fae9ae2e36989d88dc9d1 (diff) |
Merge release-20201019.0-34-g9ca66ec59 (automated)
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/boot/loader.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index a971d20ec..8c6ab213d 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -35,6 +35,7 @@ import ( "gvisor.dev/gvisor/pkg/memutil" "gvisor.dev/gvisor/pkg/rand" "gvisor.dev/gvisor/pkg/refs" + "gvisor.dev/gvisor/pkg/refsvfs2" "gvisor.dev/gvisor/pkg/sentry/arch" "gvisor.dev/gvisor/pkg/sentry/control" "gvisor.dev/gvisor/pkg/sentry/fdimport" @@ -476,6 +477,12 @@ func (l *Loader) Destroy() { // save/restore. l.k.Release() + // All sentry-created resources should have been released at this point; + // check for reference leaks. + if refsvfs2.LeakCheckEnabled() { + refsvfs2.DoLeakCheck() + } + // In the success case, stdioFDs and goferFDs will only contain // released/closed FDs that ownership has been passed over to host FDs and // gofer sessions. Close them here in case of failure. |