mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 13:10:22 +03:00
Fix ineffective recycling (#18952)
Recycle would always be called on the dummy value `any(newRT())` instead of the actual value given to the recycle function. Caught by race tests, but mostly harmless, except for reduced perf. Other minor cleanups. Introduced in #18940 (unreleased)
This commit is contained in:
@@ -235,7 +235,6 @@ func (b *Bytes) UnmarshalMsg(bytes []byte) ([]byte, error) {
|
||||
copy(*b, val)
|
||||
} else {
|
||||
if cap(*b) == 0 && len(val) <= maxBufferSize {
|
||||
PutByteBuffer(*b)
|
||||
*b = GetByteBuffer()[:0]
|
||||
} else {
|
||||
PutByteBuffer(*b)
|
||||
|
||||
Reference in New Issue
Block a user