diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-09-05 18:05:59 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-05 18:07:11 -0700 |
commit | 41b56696c4923276c6269812bb3dfa7643dab65d (patch) | |
tree | 3aa1afbe82e66b74efe97d6685449a956dd906d9 /pkg/sentry/fs/host/descriptor.go | |
parent | 5685d6b5add2acce9618aa908b846f5ce3658346 (diff) |
Imported FD in exec was leaking
Imported file needs to be closed after it's
been imported.
PiperOrigin-RevId: 211732472
Change-Id: Ia9249210558b77be076bcce465b832a22eed301f
Diffstat (limited to 'pkg/sentry/fs/host/descriptor.go')
-rw-r--r-- | pkg/sentry/fs/host/descriptor.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/fs/host/descriptor.go b/pkg/sentry/fs/host/descriptor.go index 3aee4d11c..148291ba6 100644 --- a/pkg/sentry/fs/host/descriptor.go +++ b/pkg/sentry/fs/host/descriptor.go @@ -31,9 +31,9 @@ type descriptor struct { // donated is true if the host fd was donated by another process. donated bool - // If origFD >= 0, it is the host fd that this file was - // originally created from, which must be available at time - // of restore. Only valid if donated is true. + // If origFD >= 0, it is the host fd that this file was originally created + // from, which must be available at time of restore. The FD can be closed + // after descriptor is created. Only set if donated is true. origFD int // wouldBlock is true if value (below) points to a file that can |