From e3f816248a479b0f2460b7d147774383610de936 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 11 Sep 2011 23:42:16 +0100 Subject: [PATCH] Plug Trace::String::value leak. --- trace_model.cpp | 5 +++++ trace_model.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/trace_model.cpp b/trace_model.cpp index 25dc4bb..306b9e7 100644 --- a/trace_model.cpp +++ b/trace_model.cpp @@ -42,6 +42,11 @@ Call::~Call() { } +String::~String() { + delete [] value; +} + + Struct::~Struct() { for (std::vector::iterator it = members.begin(); it != members.end(); ++it) { delete *it; diff --git a/trace_model.hpp b/trace_model.hpp index a284754..a74508e 100644 --- a/trace_model.hpp +++ b/trace_model.hpp @@ -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; -- 2.45.2