diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/dump_stabs.cc | 9 | ||||
-rw-r--r-- | src/common/dump_stabs.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/common/dump_stabs.cc b/src/common/dump_stabs.cc index 436b6215..e4ae1e1b 100644 --- a/src/common/dump_stabs.cc +++ b/src/common/dump_stabs.cc @@ -56,6 +56,15 @@ static string Demangle(const string &mangled) { return string(mangled); } +DumpStabsHandler::~DumpStabsHandler() { + // Free any functions we've accumulated but not added to the module. + for (vector<Module::Function *>::iterator func_it = functions_.begin(); + func_it != functions_.end(); func_it++) + delete *func_it; + // Free any function that we're currently within. + delete current_function_; +} + bool DumpStabsHandler::StartCompilationUnit(const char *name, uint64_t address, const char *build_directory) { assert(!in_compilation_unit_); diff --git a/src/common/dump_stabs.h b/src/common/dump_stabs.h index e5c34409..36d773e8 100644 --- a/src/common/dump_stabs.h +++ b/src/common/dump_stabs.h @@ -68,6 +68,7 @@ class DumpStabsHandler: public google_breakpad::StabsHandler { current_function_(NULL), current_source_file_(NULL), current_source_file_name_(NULL) { } + ~DumpStabsHandler(); // The standard StabsHandler virtual member functions. bool StartCompilationUnit(const char *name, uint64_t address, |