mirror of
https://github.com/minio/minio.git
synced 2025-01-26 22:23:15 -05:00
Call cleanup funcs when skip fails (#9417)
This commit is contained in:
parent
ebf3dda449
commit
85be7b39ac
@ -649,6 +649,10 @@ func NewGetObjectReader(rs *HTTPRangeSpec, oi ObjectInfo, opts ObjectOptions, cl
|
|||||||
// Apply the skipLen and limit on the decompressed stream.
|
// Apply the skipLen and limit on the decompressed stream.
|
||||||
err = s2Reader.Skip(decOff)
|
err = s2Reader.Skip(decOff)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// Call the cleanup funcs
|
||||||
|
for i := len(cFns) - 1; i >= 0; i-- {
|
||||||
|
cFns[i]()
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user