Close DecompressStream after layer is downloaded

Signed-off-by: Leandro Motta Barros <lmb@stackedboxes.org>
This commit is contained in:
Leandro Motta Barros 2023-02-21 15:00:05 -03:00
parent a4a3efb75b
commit bb21e0f191

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 {