diff --git a/container/libcontainer/handler.go b/container/libcontainer/handler.go index 4d6e8a40fc..8dff029f5a 100644 --- a/container/libcontainer/handler.go +++ b/container/libcontainer/handler.go @@ -700,6 +700,8 @@ func udpStatsFromProc(rootFs string, pid int, file string) (info.UdpStat, error) return udpStats, fmt.Errorf("failure opening %s: %v", udpStatsFile, err) } + defer r.Close() + udpStats, err = scanUDPStats(r) if err != nil { return udpStats, fmt.Errorf("couldn't read udp stats: %v", err)