diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-21 15:47:01 +0100 |
---|---|---|
committer | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-22 13:15:28 +0100 |
commit | 06dd9136a253521cb74497a59f2e6894806a5b6d (patch) | |
tree | d6728a4ffd1d15b5abe415b5574bfdab14eb7fea /libpod/container_api.go | |
parent | 6c030cd5737a6257e9b7ee2db232a24ccef294de (diff) | |
download | podman-06dd9136a253521cb74497a59f2e6894806a5b6d.tar.gz podman-06dd9136a253521cb74497a59f2e6894806a5b6d.tar.bz2 podman-06dd9136a253521cb74497a59f2e6894806a5b6d.zip |
fix a number of errcheck issues
Numerous issues remain, especially in tests/e2e.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 03b3dcc04..0b6139335 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -921,7 +921,11 @@ func (c *Container) Stat(ctx context.Context, containerPath string) (*define.Fil if err != nil { return nil, err } - defer c.unmount(false) + defer func() { + if err := c.unmount(false); err != nil { + logrus.Errorf("Unmounting container %s: %v", c.ID(), err) + } + }() } info, _, _, err := c.stat(ctx, mountPoint, containerPath) |