From 1a9917d14d66250fdc9a3781ef65df4413340a2f Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Mon, 25 Jun 2018 16:16:23 -0700 Subject: MountSource.Root() should return a refernce on the dirent. PiperOrigin-RevId: 202038397 Change-Id: I074d525f2e2d9bcd43b247b62f86f9129c101b78 --- pkg/sentry/fs/mount_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/sentry/fs/mount_test.go') 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 { -- cgit v1.2.3