cmd/root: Don't leak the subordinate ID file
Fallout from 3f0a135937
https://github.com/containers/toolbox/pull/1202
This commit is contained in:
parent
6b8d5b032e
commit
e149b89263
1 changed files with 2 additions and 0 deletions
|
@ -404,6 +404,8 @@ func validateSubIDFile(path string) (bool, error) {
|
||||||
return false, fmt.Errorf("failed to open: %w", err)
|
return false, fmt.Errorf("failed to open: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
scanner := bufio.NewScanner(file)
|
scanner := bufio.NewScanner(file)
|
||||||
scanner.Split(bufio.ScanLines)
|
scanner.Split(bufio.ScanLines)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue