diff options
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container.go b/libpod/container.go index 4d6fe3a5e..2ee87163d 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -336,7 +336,11 @@ func (c *Container) Dependencies() []string { dependsCtrs[c.config.CgroupNsCtr] = true } - depends := make([]string, len(dependsCtrs), 0) + if len(dependsCtrs) == 0 { + return []string{} + } + + depends := make([]string, 0, len(dependsCtrs)) for ctr, _ := range dependsCtrs { depends = append(depends, ctr) } |