summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-27 14:28:38 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-05-03 13:44:33 -0400
commitfb14171cba46f331fd9b25efed36c25b6b7ebcea (patch)
treecac289dfbc9cc6869915f22932e528ecb8fb71bc /pkg/domain
parent7249651329c380f21a9e5f7bef870950b6086eab (diff)
downloadpodman-fb14171cba46f331fd9b25efed36c25b6b7ebcea.tar.gz
podman-fb14171cba46f331fd9b25efed36c25b6b7ebcea.tar.bz2
podman-fb14171cba46f331fd9b25efed36c25b6b7ebcea.zip
enable errcheck linter
The errcheck linter makes sure that errors are always check and not ignored by accident. It spotted a lot of unchecked errors, mostly in the tests but also some real problem in the code. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/containers.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index b56c36015..89b09bb1d 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -641,7 +641,11 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
}
restoreOptions.CheckpointImageID = img.ID()
mountPoint, err := img.Mount(ctx, nil, "")
- defer img.Unmount(true)
+ defer func() {
+ if err := img.Unmount(true); err != nil {
+ logrus.Errorf("Failed to unmount image: %v", err)
+ }
+ }()
if err != nil {
return nil, err
}