Ver código fonte

fix buffer leak

Darien Raymond 8 anos atrás
pai
commit
8554a5e0bf
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      common/buf/multi_buffer.go

+ 1 - 0
common/buf/multi_buffer.go

@@ -95,6 +95,7 @@ func (mb *MultiBuffer) Read(b []byte) (int, error) {
 		b = b[nBytes:]
 		if bb.IsEmpty() {
 			bb.Release()
+			(*mb)[i] = nil
 		} else {
 			endIndex = i
 			break