chunked: release zstd on termination

This commit is contained in:
Giuseppe Scrivano 2021-12-25 10:54:28 +01:00
parent 9d808fd79e
commit 65b0c4b592
1 changed files with 5 additions and 0 deletions

View File

@ -1185,6 +1185,11 @@ func parseBooleanPullOption(storeOpts *storage.StoreOptions, name string, def bo
func (c *chunkedDiffer) ApplyDiff(dest string, options *archive.TarOptions) (graphdriver.DriverWithDifferOutput, error) {
defer c.layersCache.release()
defer func() {
if c.zstdReader != nil {
c.zstdReader.Close()
}
}()
bigData := map[string][]byte{
bigDataKey: c.manifest,