Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libpod/runtime_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down