From d1e7e7002ff046f8d03e483b7efaafe9364211ab Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 7 Nov 2017 11:39:54 +0100 Subject: [PATCH] fix buffer leak in crypto io --- common/crypto/io.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/crypto/io.go b/common/crypto/io.go index 60e593e5..cc595f17 100644 --- a/common/crypto/io.go +++ b/common/crypto/io.go @@ -51,6 +51,8 @@ func (w *CryptionWriter) Write(data []byte) (int, error) { } func (w *CryptionWriter) WriteMultiBuffer(mb buf.MultiBuffer) error { + defer mb.Release() + bs := mb.ToNetBuffers() for _, b := range bs { w.stream.XORKeyStream(b, b)