lib/ur: Plug file descriptor leak in Linux memorySize (#7266)

This commit is contained in:
greatroar 2021-01-11 15:15:21 +01:00 committed by GitHub
parent 0b193b76c2
commit f6fac3e949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ func memorySize() int64 {
if err != nil {
return 0
}
defer f.Close()
s := bufio.NewScanner(f)
if !s.Scan() {