Skip to content

Commit ba854f2

Browse files
testwillrudyfly
authored andcommitted
fix: close /proc/1/mountinfo
1 parent 8680cc4 commit ba854f2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lxcfs/lxcfs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func CheckLxcfsMount() error {
2929
if err != nil {
3030
return fmt.Errorf("Check lxcfs mounts failed: %v", err)
3131
}
32+
defer f.Close()
3233
fr := bufio.NewReader(f)
3334
for {
3435
line, err := fr.ReadBytes('\n')

0 commit comments

Comments
 (0)