diff --git a/common/buf/buffer.go b/common/buf/buffer.go index 1b94936f..c15e3f96 100644 --- a/common/buf/buffer.go +++ b/common/buf/buffer.go @@ -207,7 +207,7 @@ func NewBytes(size uint32) []byte { } func FreeBytes(b []byte) { - size := len(b) + size := cap(b) switch { case size >= 128*1024: pool128k.Put(b)