summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/user/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/user/user.go')
-rw-r--r--pkg/sentry/fs/user/user.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/fs/user/user.go b/pkg/sentry/fs/user/user.go
index 936fd3932..1f8684dc6 100644
--- a/pkg/sentry/fs/user/user.go
+++ b/pkg/sentry/fs/user/user.go
@@ -105,6 +105,7 @@ func getExecUserHomeVFS2(ctx context.Context, mns *vfs.MountNamespace, uid auth.
const defaultHome = "/"
root := mns.Root()
+ root.IncRef()
defer root.DecRef(ctx)
creds := auth.CredentialsFromContext(ctx)