From ead3fa09e5cd9720db5ec39195c6575e6e4663d4 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 7 Nov 2017 22:33:16 +0100 Subject: [PATCH] release buffer on error --- app/proxyman/mux/reader.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/proxyman/mux/reader.go b/app/proxyman/mux/reader.go index 5b01a4906..298eec058 100644 --- a/app/proxyman/mux/reader.go +++ b/app/proxyman/mux/reader.go @@ -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 }