Commit bf48ed32 authored by Felix Lange's avatar Felix Lange

metrics: fix file descriptor leak when reading disk stats on linux

The disk stats file was not closed after reading.
parent ba14957c
......@@ -34,6 +34,7 @@ func ReadDiskStats(stats *DiskStats) error {
if err != nil {
return err
}
defer inf.Close()
in := bufio.NewReader(inf)
// Iterate over the IO counter, and extract what we need
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment