From f322d917fb1f1465049ed29853081ef47ca16800 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Thu, 28 Nov 2013 21:15:17 +0100 Subject: [PATCH] THRIFT-2275 Fix memory leak in golang compact_protocol. Patch: bolin huang --- lib/go/thrift/compact_protocol.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/go/thrift/compact_protocol.go b/lib/go/thrift/compact_protocol.go index 74d36d00..f89fc2f3 100644 --- a/lib/go/thrift/compact_protocol.go +++ b/lib/go/thrift/compact_protocol.go @@ -352,6 +352,7 @@ func (p *TCompactProtocol) ReadStructBegin() (name string, err error) { func (p *TCompactProtocol) ReadStructEnd() error { // consume the last field we read off the wire. p.lastFieldId = p.lastField[len(p.lastField)-1] + p.lastField = p.lastField[:len(p.lastField)-1] return nil } -- 2.17.1