summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-05 23:19:33 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-05 23:19:33 +0000
commit9279fa58ee3782fffc77770d08896da6acdf3b07 (patch)
tree4238708a760db3a5cf7059eb62f2f38738923aa1 /pkg/sentry/syscalls
parent00fcf4e7b0e3097ef397600e3230405ff1830f37 (diff)
parent1403a88c67ccc87af383f5e54fd2f77c673eebe7 (diff)
Merge release-20200804.0-23-g1403a88c6 (automated)
Diffstat (limited to 'pkg/sentry/syscalls')
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/memfd.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/memfd.go b/pkg/sentry/syscalls/linux/vfs2/memfd.go
index 519583e4e..c4c0f9e0a 100644
--- a/pkg/sentry/syscalls/linux/vfs2/memfd.go
+++ b/pkg/sentry/syscalls/linux/vfs2/memfd.go
@@ -51,6 +51,7 @@ func MemfdCreate(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.S
if err != nil {
return 0, nil, err
}
+ defer file.DecRef(t)
fd, err := t.NewFDFromVFS2(0, file, kernel.FDFlags{
CloseOnExec: cloExec,