From 8d09d7422400a9ca2aeee5b8906347483c45a588 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 20 Feb 2019 22:55:57 +0100 Subject: [PATCH] release buffer in error case --- common/net/connection.go | 1 + 1 file changed, 1 insertion(+) diff --git a/common/net/connection.go b/common/net/connection.go index a035803f..0540ce99 100644 --- a/common/net/connection.go +++ b/common/net/connection.go @@ -117,6 +117,7 @@ func (c *connection) Write(b []byte) (int, error) { func (c *connection) WriteMultiBuffer(mb buf.MultiBuffer) error { if c.done.Done() { + buf.ReleaseMulti(mb) return io.ErrClosedPipe }