Fix missing close
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
parent
851bfe8c06
commit
6ce0f6a264
@ -410,6 +410,7 @@ func writeJSON(ctx context.Context, cs content.Store, x interface{}, oldDesc oci
|
||||
return nil, err
|
||||
}
|
||||
if err := content.Copy(ctx, w, bytes.NewReader(b), int64(len(b)), dgst, content.WithLabels(labels)); err != nil {
|
||||
w.Close()
|
||||
return nil, err
|
||||
}
|
||||
if err := w.Close(); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user