Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
4b4f42b
)
THRIFT-2275 Fix memory leak in golang compact_protocol.
author
Jens Geyer
<jensg@apache.org>
Thu, 28 Nov 2013 20:15:17 +0000
(21:15 +0100)
committer
Jens Geyer
<jensg@apache.org>
Thu, 28 Nov 2013 20:15:17 +0000
(21:15 +0100)
Patch: bolin huang
lib/go/thrift/compact_protocol.go
patch
|
blob
|
history
diff --git
a/lib/go/thrift/compact_protocol.go
b/lib/go/thrift/compact_protocol.go
index
74d36d0
..
f89fc2f
100644
(file)
--- 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
}