From 970bef178e91d4783c266c33988d28a378cc8cae Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Thu, 8 Feb 2024 16:30:36 +0800 Subject: [PATCH] test Signed-off-by: Weizhen Wang --- internal/client/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }) }