tiny fix, add a null check for specs.Resources.Pids.Limit

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
This commit is contained in:
Shukui Yang 2016-10-13 15:55:30 +08:00
parent 26ebd6ab63
commit affc105264
1 changed files with 1 additions and 1 deletions

View File

@ -373,7 +373,7 @@ func createCgroupConfig(name string, useSystemdCgroup bool, spec *specs.Spec) (*
c.Resources.CpusetMems = *r.CPU.Mems
}
}
if r.Pids != nil {
if r.Pids != nil && r.Pids.Limit != nil {
c.Resources.PidsLimit = *r.Pids.Limit
}
if r.BlockIO != nil {