diff --git a/vendor/github.com/lucas-clemente/quic-go/buffer_pool.go b/vendor/github.com/lucas-clemente/quic-go/buffer_pool.go index 02e506c2..9240edf4 100644 --- a/vendor/github.com/lucas-clemente/quic-go/buffer_pool.go +++ b/vendor/github.com/lucas-clemente/quic-go/buffer_pool.go @@ -36,7 +36,8 @@ func (b *packetBuffer) Release() { } // only put the packetBuffer back if it's not used any more if b.refCount == 0 { - bufferPool.Put(b.Slice) + buffer := b.Slice[0:cap(b.Slice)] + bufferPool.Put(buffer) } }