diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-06-25 16:16:23 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-25 16:17:12 -0700 |
commit | 1a9917d14d66250fdc9a3781ef65df4413340a2f (patch) | |
tree | 6b732372d89723f27b4fbe547f6eddc8b5680e57 /pkg/sentry/fs/mount_test.go | |
parent | 478f0ac0038afda267814fa154bcd32feb07c3b3 (diff) |
MountSource.Root() should return a refernce on the dirent.
PiperOrigin-RevId: 202038397
Change-Id: I074d525f2e2d9bcd43b247b62f86f9129c101b78
Diffstat (limited to 'pkg/sentry/fs/mount_test.go')
-rw-r--r-- | pkg/sentry/fs/mount_test.go | 4 |
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 { |