]> git.cworth.org Git - apitrace/commitdiff
Plug Trace::String::value leak.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Sep 2011 22:42:16 +0000 (23:42 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Sep 2011 22:42:16 +0000 (23:42 +0100)
trace_model.cpp
trace_model.hpp

index 25dc4bb487138a2e38a33f277940c733bab5ce7e..306b9e7a64da745384f06ee050eeddc97e9a1b4b 100644 (file)
@@ -42,6 +42,11 @@ Call::~Call() {
 }
 
 
+String::~String() {
+    delete [] value;
+}
+
+
 Struct::~Struct() {
     for (std::vector<Value *>::iterator it = members.begin(); it != members.end(); ++it) {
         delete *it;
index a2847547421f8972666681d0784882192e2fb628..a74508efc5e0a0fc2411f9fe19b3e1aea070beda 100644 (file)
@@ -190,6 +190,7 @@ class String : public Value
 {
 public:
     String(const char * _value) : value(_value) {}
+    ~String();
 
     bool toBool(void) const;
     const char *toString(void) const;