You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2013/11/28 21:16:30 UTC

git commit: THRIFT-2275 Fix memory leak in golang compact_protocol.

Updated Branches:
  refs/heads/master 4b4f42b45 -> f322d917f


THRIFT-2275 Fix memory leak in golang compact_protocol.

Patch: bolin huang


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/f322d917
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/f322d917
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/f322d917

Branch: refs/heads/master
Commit: f322d917fb1f1465049ed29853081ef47ca16800
Parents: 4b4f42b
Author: Jens Geyer <je...@apache.org>
Authored: Thu Nov 28 21:15:17 2013 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Thu Nov 28 21:15:17 2013 +0100

----------------------------------------------------------------------
 lib/go/thrift/compact_protocol.go | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/f322d917/lib/go/thrift/compact_protocol.go
----------------------------------------------------------------------
diff --git a/lib/go/thrift/compact_protocol.go b/lib/go/thrift/compact_protocol.go
index 74d36d0..f89fc2f 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
 }