aboutsummaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 981f745b4..0f992822a 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -219,13 +219,8 @@ func (r *Runtime) removeContainer(c *Container, force bool) error {
return errors.Wrapf(ErrCtrExists, "container %s has dependent containers which must be removed before it: %s", c.ID(), depsStr)
}
- // Tear down the container's cgroups (if they exist)
- if err := c.cleanupCgroups(); err != nil {
- return err
- }
-
- // Stop the container's network namespace (if it has one)
- if err := r.teardownNetNS(c); err != nil {
+ // Clean up network namespace, cgroups, mounts
+ if err := c.cleanup(); err != nil {
return err
}