mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #2710 from Creatone/creatone/fscommon-close-fd
libctl/cgroups/fscommon: close fd
This commit is contained in:
@@ -32,6 +32,7 @@ func ReadFile(dir, file string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer fd.Close()
|
||||
var buf bytes.Buffer
|
||||
|
||||
_, err = buf.ReadFrom(fd)
|
||||
|
||||
Reference in New Issue
Block a user