diff --git a/internal/client/pool.go b/internal/client/pool.go index 25ed617d2..06327759f 100644 --- a/internal/client/pool.go +++ b/internal/client/pool.go @@ -102,7 +102,7 @@ func (p *bufferPool) Get(size int) []byte { func (p *bufferPool) Put(i *[]byte) { runtime.SetFinalizer(i, func(i *[]byte) { - (*i) = (*i)[:0] + clear(*i) p.Pool.Put(i) }) }