mirror of https://github.com/k3s-io/k3s
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 doSafeMakeDirk3s-v1.15.3
commit
c0f1f9f052
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue