Invalidate buf pointer after returning it to the pool

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protocol.ai>
parent 29aeb2c8
......@@ -42,6 +42,7 @@ func (b *Buzhash) NextBytes() ([]byte, error) {
} else {
b.err = err
pool.Put(buf)
b.buf = nil
return nil, err
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment