mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
metrics: fix file descriptor leak when reading disk stats on linux
The disk stats file was not closed after reading.
This commit is contained in:
parent
ba14957cf3
commit
bf48ed32dd
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue