mirror of
https://github.com/SSLMate/certspotter.git
synced 2025-06-27 10:15:33 +02:00
Avoid leaving a file open for longer than necessary
This commit is contained in:
parent
18b2d6d2a5
commit
2cccf67601
@ -221,8 +221,8 @@ func main() {
|
||||
fmt.Fprintf(os.Stderr, "%s: %s: %s\n", os.Args[0], *watchlistFilename, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer file.Close()
|
||||
watchlist, err = readWatchlist(file)
|
||||
file.Close()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%s: %s: %s\n", os.Args[0], *watchlistFilename, err)
|
||||
os.Exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user