good morning!!!!

Skip to content
Snippets Groups Projects
Commit bf48ed32 authored by Felix Lange's avatar Felix Lange
Browse files

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

The disk stats file was not closed after reading.
parent ba14957c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment