Skip to content

Commit affc105

Browse files
author
Shukui Yang
committed
tiny fix, add a null check for specs.Resources.Pids.Limit
Signed-off-by: Shukui Yang <[email protected]>
1 parent 26ebd6a commit affc105

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)