Skip to content

Commit d186a75

Browse files
authored
Merge pull request #1111 from keloyang/rpid-limit-check
tiny fix, add a null check for specs.Resources.Pids.Limit
2 parents 3b4ff53 + affc105 commit d186a75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/specconv/spec_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ func createCgroupConfig(name string, useSystemdCgroup bool, spec *specs.Spec) (*
373373
c.Resources.CpusetMems = *r.CPU.Mems
374374
}
375375
}
376-
if r.Pids != nil {
376+
if r.Pids != nil && r.Pids.Limit != nil {
377377
c.Resources.PidsLimit = *r.Pids.Limit
378378
}
379379
if r.BlockIO != nil {

0 commit comments

Comments
 (0)