diff --git a/cgroups/fs/apply_raw.go b/cgroups/fs/apply_raw.go index 60f318e..5f9fc82 100644 --- a/cgroups/fs/apply_raw.go +++ b/cgroups/fs/apply_raw.go @@ -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 } }