diff --git a/layer/migration.go b/layer/migration.go index ac0f0065f2..b45c31099d 100644 --- a/layer/migration.go +++ b/layer/migration.go @@ -127,6 +127,7 @@ func (ls *layerStore) checksumForGraphIDNoTarsplit(id, parent, newTarDataPath st } defer f.Close() mfz := gzip.NewWriter(f) + defer mfz.Close() metaPacker := storage.NewJSONPacker(mfz) packerCounter := &packSizeCounter{metaPacker, &size}