cmd/root: Don't leak the subordinate ID file

Fallout from 3f0a135937

https://github.com/containers/toolbox/pull/1202
This commit is contained in:
Debarshi Ray 2022-12-20 10:04:06 +01:00
parent 6b8d5b032e
commit e149b89263

View file

@ -404,6 +404,8 @@ func validateSubIDFile(path string) (bool, error) {
return false, fmt.Errorf("failed to open: %w", err)
}
defer file.Close()
scanner := bufio.NewScanner(file)
scanner.Split(bufio.ScanLines)