Merge pull request #1034 from testwill/close_file

fix: close resolv.conf
This commit is contained in:
Tomofumi Hayashi 2024-05-13 21:19:20 +09:00 committed by GitHub
commit dc704d19d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,7 @@ func parseResolvConf(filename string) (*types.DNS, error) {
if err != nil {
return nil, err
}
defer fp.Close()
dns := types.DNS{}
scanner := bufio.NewScanner(fp)