Merge pull request #22404 from testwill/close_file

fix: close resource file
This commit is contained in:
openshift-merge-bot[bot] 2024-05-21 11:47:36 +00:00 committed by GitHub
commit 4f31335fa4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -342,6 +342,7 @@ func generateResourceFile(res *spec.LinuxResources) (string, []string, error) {
if err != nil {
return "", nil, err
}
defer f.Close()
j, err := json.Marshal(res)
if err != nil {