mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
Fix missing GetObjectNInfo Closure (#11243)
Review for missing Close of returned value from `GetObjectNInfo`. This was often obscured by the stuff that auto-unlocks when reaching EOF.
This commit is contained in:
@@ -341,13 +341,13 @@ func transitionObject(ctx context.Context, objectAPI ObjectLayer, objInfo Object
|
||||
}
|
||||
oi := gr.ObjInfo
|
||||
if oi.TransitionStatus == lifecycle.TransitionComplete {
|
||||
gr.Close() // make sure to avoid leaks.
|
||||
gr.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
putOpts := putTransitionOpts(oi)
|
||||
if _, err = tgt.PutObject(ctx, arn.Bucket, oi.Name, gr, oi.Size, "", "", putOpts); err != nil {
|
||||
gr.Close() // make sure to avoid leaks.
|
||||
gr.Close()
|
||||
return err
|
||||
}
|
||||
gr.Close()
|
||||
|
||||
Reference in New Issue
Block a user