From de63d7006b60084e339b459c3d60e4863e57bb9b Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Mon, 21 Jul 2014 18:55:06 -0700 Subject: [PATCH] Small fix for GetAllCgroups(). Incorrect parsing of length of fields. Docker-DCO-1.1-Signed-off-by: Victor Marmol (github: vmarmol) --- cgroups/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgroups/utils.go b/cgroups/utils.go index 0d19b3ea..6fed5cf3 100644 --- a/cgroups/utils.go +++ b/cgroups/utils.go @@ -97,7 +97,7 @@ func GetAllSubsystems() ([]string, error) { text := s.Text() if text[0] != '#' { parts := strings.Fields(text) - if len(parts) > 4 && parts[3] != "0" { + if len(parts) >= 4 && parts[3] != "0" { subsystems = append(subsystems, parts[0]) } }