diff options
Diffstat (limited to 'libpod/image')
-rw-r--r-- | libpod/image/image.go | 5 | ||||
-rw-r--r-- | libpod/image/pull.go | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 355249b12..ba1080a71 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -709,11 +709,12 @@ func (i *Image) Size(ctx context.Context) (*uint64, error) { } i.image = localImage } - if sum, err := i.imageruntime.store.ImageSize(i.ID()); err == nil && sum >= 0 { + sum, err := i.imageruntime.store.ImageSize(i.ID()) + if err == nil && sum >= 0 { usum := uint64(sum) return &usum, nil } - return nil, errors.Errorf("unable to determine size") + return nil, errors.Wrap(err, "unable to determine size") } // toImageRef returns an Image Reference type from an image diff --git a/libpod/image/pull.go b/libpod/image/pull.go index 76294ba06..fd359d593 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -126,6 +126,7 @@ func (ir *Runtime) pullGoalFromImageReference(ctx context.Context, srcRef types. if err != nil { return nil, err } + defer tarSource.Close() manifest, err := tarSource.LoadTarManifest() if err != nil { |