Skip to content

Commit 338a09a

Browse files
authored
Merge pull request kubernetes#82873 from odinuge/volume-fd-leak-openstack
Fix possible fd leak and closing of dirs in doSafeMakeDir
2 parents 60044a8 + 3463f3c commit 338a09a

File tree

1 file changed

+1
-1
lines changed
  • staging/src/k8s.io/legacy-cloud-providers/openstack/util/mount

1 file changed

+1
-1
lines changed

staging/src/k8s.io/legacy-cloud-providers/openstack/util/mount/mount_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ func doSafeMakeDir(pathname string, base string, perm os.FileMode) error {
11321132
return fmt.Errorf("cannot create directory %s: %s", currentPath, err)
11331133
}
11341134
// Dive into the created directory
1135-
childFD, err := syscall.Openat(parentFD, dir, nofollowFlags, 0)
1135+
childFD, err = syscall.Openat(parentFD, dir, nofollowFlags, 0)
11361136
if err != nil {
11371137
return fmt.Errorf("cannot open %s: %s", currentPath, err)
11381138
}

0 commit comments

Comments
 (0)