summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/fs_context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/kernel/fs_context.go')
-rw-r--r--pkg/sentry/kernel/fs_context.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/fs_context.go b/pkg/sentry/kernel/fs_context.go
index 08ea2e09c..41fb2a784 100644
--- a/pkg/sentry/kernel/fs_context.go
+++ b/pkg/sentry/kernel/fs_context.go
@@ -130,13 +130,15 @@ func (f *FSContext) Fork() *FSContext {
f.root.IncRef()
}
- return &FSContext{
+ ctx := &FSContext{
cwd: f.cwd,
root: f.root,
cwdVFS2: f.cwdVFS2,
rootVFS2: f.rootVFS2,
umask: f.umask,
}
+ ctx.EnableLeakCheck()
+ return ctx
}
// WorkingDirectory returns the current working directory.