diff --git a/graph/manifest.go b/graph/manifest.go index f9869fcaf2..4b9f9a631b 100644 --- a/graph/manifest.go +++ b/graph/manifest.go @@ -73,6 +73,8 @@ func (s *TagStore) newManifest(localName, remoteName, tag string) ([]byte, error return nil, err } + defer archive.Close() + tarSum, err := tarsum.NewTarSum(archive, true, tarsum.Version1) if err != nil { return nil, err diff --git a/graph/push.go b/graph/push.go index 6ae2d670d6..290c1d0f5e 100644 --- a/graph/push.go +++ b/graph/push.go @@ -392,6 +392,8 @@ func (s *TagStore) pushV2Image(r *registry.Session, img *image.Image, endpoint * if err != nil { return err } + defer arch.Close() + tf, err := s.graph.newTempFile() if err != nil { return err