mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 18:53:43 -04:00
middleware/auto: Close to reader
Close the reader, stop leaking file descriptors.
This commit is contained in:
@@ -43,6 +43,7 @@ func (a Auto) Walk() error {
|
||||
log.Printf("[WARNING] Opening %s failed: %s", path, err)
|
||||
return nil
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
zo, err := file.Parse(reader, origin, path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user