mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Merge pull request #32106 from jellonek/fd_leaks
Automatic merge from submit-queue Ensure that we are closing files. **What this PR does / why we need it**: In several places we are leaking file descriptors. This could be problematic on systems with low ulimits for them. **Release note**: ```release-note ```
This commit is contained in:
@@ -1529,6 +1529,7 @@ func readBytesFromFile(filename string) []byte {
|
||||
framework.Failf(err.Error())
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
data, err := ioutil.ReadAll(file)
|
||||
if err != nil {
|
||||
framework.Failf(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user