Commit 727c7bbe authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Handle FreeBuffer(nil)

parent d60b0f23
...@@ -134,7 +134,7 @@ func (me *BufferPoolImpl) FreeBuffer(slice []byte) { ...@@ -134,7 +134,7 @@ func (me *BufferPoolImpl) FreeBuffer(slice []byte) {
if slice == nil { if slice == nil {
return return
} }
if cap(slice) % PAGESIZE != 0 { if cap(slice) % PAGESIZE != 0 || cap(slice) == 0 {
return return
} }
psz := cap(slice) / PAGESIZE psz := cap(slice) / PAGESIZE
......
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