diff options
author | Dean Deng <deandeng@google.com> | 2020-08-05 16:14:40 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-05 16:16:32 -0700 |
commit | 1403a88c67ccc87af383f5e54fd2f77c673eebe7 (patch) | |
tree | a92598967967a11ca646d681921821b2d714b541 /pkg/sentry/syscalls/linux | |
parent | e7b232a5b881c8930db968a7709ebd93cb2cab04 (diff) |
Release extra memfd reference.
PiperOrigin-RevId: 325122849
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r-- | pkg/sentry/syscalls/linux/vfs2/memfd.go | 1 |
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, |