Merge pull request #5476 from rjnagal/libcontainer-fixes

Cleanup cgroups on Set failures
This commit is contained in:
Michael Crosby 2014-04-29 12:27:31 -07:00
commit bf59e67232
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error) {
}
for _, sys := range subsystems {
if err := sys.Set(d); err != nil {
d.Cleanup()
return nil, err
}
}