mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
xl: Fix typo in PutObject when uploading a 10Mb file (#6567)
PutObject forgot to allocate memory when the size of the uploaded file is exactly equal to blockSizeV1 = 10 Mb.
This commit is contained in:
parent
c2b7b82ef4
commit
e031f2b614
@ -686,7 +686,7 @@ func (xl xlObjects) putObject(ctx context.Context, bucket string, object string,
|
||||
switch size := data.Size(); {
|
||||
case size == 0:
|
||||
buffer = make([]byte, 1) // Allocate atleast a byte to reach EOF
|
||||
case size == -1 || size > blockSizeV1:
|
||||
case size == -1 || size >= blockSizeV1:
|
||||
buffer = xl.bp.Get()
|
||||
defer xl.bp.Put(buffer)
|
||||
case size < blockSizeV1:
|
||||
|
Loading…
Reference in New Issue
Block a user