Skip to content

Commit

Permalink
cmd/root: Don't leak the subordinate ID file
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshiray committed Jan 26, 2023
1 parent 6b8d5b0 commit e149b89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e149b89

Please sign in to comment.