Skip to content

Commit 51c11a8

Browse files
author
Mrunal Patel
authored
Merge pull request #1042 from datawolf/out-of-loop
move m.GetPaths out of the loop
2 parents f516b5d + fd92846 commit 51c11a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcontainer/cgroups/fs/apply_raw.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ func (m *Manager) Set(container *configs.Config) error {
195195
if m.Cgroups.Paths != nil {
196196
return nil
197197
}
198+
199+
paths := m.GetPaths()
198200
for _, sys := range subsystems {
199-
paths := m.GetPaths()
200201
path := paths[sys.Name()]
201202
if err := sys.Set(path, container.Cgroups); err != nil {
202203
return err

0 commit comments

Comments
 (0)