diff --git a/pkg/specgen/generate/oci_linux.go b/pkg/specgen/generate/oci_linux.go index 2a1afbecc4..ddba5f7175 100644 --- a/pkg/specgen/generate/oci_linux.go +++ b/pkg/specgen/generate/oci_linux.go @@ -57,7 +57,7 @@ func getCgroupPermissions(unmask []string) string { return ro } - if unmask != nil && unmask[0] == "ALL" { + if len(unmask) != 0 && unmask[0] == "ALL" { return rw }