Merge pull request #79663 from odinuge/automated-cherry-pick-of-#79534-upstream-release-1.15

Automated cherry pick of #79534: Fix closing of dirs in doSafeMakeDir
k3s-v1.15.3
Kubernetes Prow Robot 2019-07-04 04:44:25 -07:00 committed by GitHub
commit c0f1f9f052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ func doSafeMakeDir(pathname string, base string, perm os.FileMode) error {
return fmt.Errorf("cannot create directory %s: %s", currentPath, err)
}
// Dive into the created directory
childFD, err := syscall.Openat(parentFD, dir, nofollowFlags, 0)
childFD, err = syscall.Openat(parentFD, dir, nofollowFlags, 0)
if err != nil {
return fmt.Errorf("cannot open %s: %s", currentPath, err)
}