diff --git a/proc.go b/proc.go index d492a4d..b9b70d3 100644 --- a/proc.go +++ b/proc.go @@ -214,6 +214,7 @@ func getAllPids() []int { log.Warning("Error opening /proc: %v", err) return nil } + defer d.Close() names, err := d.Readdirnames(0) if err != nil { log.Warning("Error reading directory names from /proc: %v", err)