THRIFT-706. cpp: Fix memory leak of string_buf_ in TCompactProtocol
authorDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 00:49:14 +0000 (00:49 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 00:49:14 +0000 (00:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920597 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/protocol/TCompactProtocol.h

index b4e06f0..1d940a2 100644 (file)
@@ -109,6 +109,9 @@ class TCompactProtocol : public TProtocol {
     boolValue_.hasBoolValue = false;
   }
 
+  ~TCompactProtocol() {
+    free(string_buf_);
+  }
 
 
   /**