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.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index ae9b3e5bc..760a07daf 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -439,9 +439,12 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool,
}
} else {
if err := r.state.RemoveContainer(c); err != nil {
- cleanupErr = err
+ if cleanupErr == nil {
+ cleanupErr = err
+ } else {
+ logrus.Errorf("removing container: %v", err)
+ }
}
- logrus.Errorf("removing container: %v", err)
}
// Set container as invalid so it can no longer be used