Merge pull request #45050 from lmbarros/close-reader

Close DecompressStream after layer is downloaded
This commit is contained in:
Brian Goff 2023-02-21 22:57:53 +00:00 committed by GitHub
commit 68fe202f06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -344,6 +344,7 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor,
d.err = fmt.Errorf("could not get decompression stream: %v", err)
return
}
defer inflatedLayerData.Close()
var src distribution.Descriptor
if fs, ok := descriptor.(distribution.Describable); ok {