Cleanup existing controllers when cleanup fails mid-way.
Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
This commit is contained in:
parent
8cb62581de
commit
592fd56d49
1 changed files with 1 additions and 0 deletions
|
@ -67,6 +67,7 @@ func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error) {
|
||||||
}
|
}
|
||||||
for _, sys := range subsystems {
|
for _, sys := range subsystems {
|
||||||
if err := sys.Set(d); err != nil {
|
if err := sys.Set(d); err != nil {
|
||||||
|
d.Cleanup()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue