Fix data race
This commit is contained in:
parent
88dd4778eb
commit
003cba6e1b
@ -31,7 +31,6 @@ func getBuf(size, capacity int) []uint8 {
|
|||||||
|
|
||||||
buf := *bufPool.Get().(*[]uint8)
|
buf := *bufPool.Get().(*[]uint8)
|
||||||
if cap(buf) < capacity {
|
if cap(buf) < capacity {
|
||||||
bufPool.Put(&buf)
|
|
||||||
buf = make([]uint8, capacity)
|
buf = make([]uint8, capacity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user