summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-10-09 18:01:50 +0000
committergVisor bot <gvisor-bot@google.com>2020-10-09 18:01:50 +0000
commitd510fb87ce9b4f9eaff8be3936bf85443b0cf6e3 (patch)
treea864af6fb482c71fd1bca4c7ec4881b967f98ecf
parent48606fbf85c7b5e9884a9a212e918283c16a1903 (diff)
parent76a09f0cf5994bae5684fc80b7e7da6161b52975 (diff)
Merge release-20200928.0-75-g76a09f0cf (automated)
-rw-r--r--pkg/sentry/syscalls/linux/sys_file.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_file.go b/pkg/sentry/syscalls/linux/sys_file.go
index 98331eb3c..519066a47 100644
--- a/pkg/sentry/syscalls/linux/sys_file.go
+++ b/pkg/sentry/syscalls/linux/sys_file.go
@@ -84,6 +84,7 @@ func fileOpOn(t *kernel.Task, dirFD int32, path string, resolve bool, fn func(ro
}
rel = f.Dirent
if !fs.IsDir(rel.Inode.StableAttr) {
+ f.DecRef(t)
return syserror.ENOTDIR
}
}