summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index aa49b2d51..932bebdef 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -258,6 +258,9 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool)
}
}
+ // Set container as invalid so it can no longer be used
+ c.valid = false
+
// Clean up network namespace, cgroups, mounts
if err := c.cleanup(); err != nil {
if cleanupErr == nil {
@@ -289,9 +292,6 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool)
}
}
- // Set container as invalid so it can no longer be used
- c.valid = false
-
return cleanupErr
}