fix: close resource file

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
guoguangwu 2024-04-18 09:29:05 +08:00
parent f3276e77ae
commit 120660e239
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 {