Add missing close when reading CSV file

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-04-08 08:00:37 +02:00
parent 99baea9d51
commit d8109dc49b

View File

@ -87,6 +87,8 @@ func ParseFile(logger *logrus.Logger, filename string) ([]*MountSpec, error) {
if err != nil {
return nil, fmt.Errorf("failed to open %v for reading: %v", filename, err)
}
defer csvFile.Close()
return parseCSVFromReader(logger, csvFile), nil
}