mirror of https://github.com/v2ray/v2ray-core
release buffer on error
parent
cab5c10fc2
commit
ead3fa09e5
|
@ -104,6 +104,7 @@ func (r *StreamReader) Read() (buf.MultiBuffer, error) {
|
|||
if err := b.AppendSupplier(func(bb []byte) (int, error) {
|
||||
return r.reader.Read(bb[:readLen])
|
||||
}); err != nil {
|
||||
b.Release()
|
||||
mb.Release()
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue