summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/mount_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/mount_test.go')
-rw-r--r--pkg/sentry/fs/mount_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/fs/mount_test.go b/pkg/sentry/fs/mount_test.go
index 3a053c154..968b435ab 100644
--- a/pkg/sentry/fs/mount_test.go
+++ b/pkg/sentry/fs/mount_test.go
@@ -204,7 +204,9 @@ func mountPathsAre(root *Dirent, got []*MountSource, want ...string) error {
}
gotPaths := make(map[string]struct{}, len(got))
for _, g := range got {
- n, _ := g.Root().FullName(root)
+ groot := g.Root()
+ n, _ := groot.FullName(root)
+ groot.DecRef()
gotPaths[n] = struct{}{}
}
for _, w := range want {