diff options
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/boot/loader_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runsc/boot/loader_test.go b/runsc/boot/loader_test.go index 10efa4427..7d35dcae2 100644 --- a/runsc/boot/loader_test.go +++ b/runsc/boot/loader_test.go @@ -398,8 +398,10 @@ func TestCreateMountNamespace(t *testing.T) { root := mm.Root() defer root.DecRef() for _, p := range tc.expectedPaths { - if _, err := mm.FindInode(ctx, root, root, p, 0); err != nil { + if d, err := mm.FindInode(ctx, root, root, p, 0); err != nil { t.Errorf("expected path %v to exist with spec %v, but got error %v", p, tc.spec, err) + } else { + d.DecRef() } } }) |