forked from TrueCloudLab/frostfs-api-go
[#278] pkg/client: Fix payload slice allocation in Object Range method
Allocate capacity instead of length of the slice to write the object payload range since each chunk is written through `append`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
bb217067f4
commit
fcb2cce8a0
1 changed files with 1 additions and 1 deletions
|
@ -874,7 +874,7 @@ func (c *clientImpl) ObjectPayloadRangeData(ctx context.Context, p *RangeDataPar
|
|||
|
||||
var payload []byte
|
||||
if p.w != nil {
|
||||
payload = make([]byte, p.r.GetLength())
|
||||
payload = make([]byte, 0, p.r.GetLength())
|
||||
}
|
||||
|
||||
resp := new(v2object.GetRangeResponse)
|
||||
|
|
Loading…
Reference in a new issue