mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-17 03:50:51 +02:00
fix slab clearing error
This commit is contained in:
@@ -42,7 +42,7 @@ func getSlotPool(size int) (*sync.Pool, bool) {
|
||||
func Allocate(size int) []byte {
|
||||
if pool, found := getSlotPool(size); found {
|
||||
slab := *pool.Get().(*[]byte)
|
||||
for i := 0; i < size; i++ {
|
||||
for i, _ := range slab {
|
||||
slab[i] = 0
|
||||
}
|
||||
return slab[:size]
|
||||
|
||||
Reference in New Issue
Block a user