diff options
author | Cary Coutant <ccoutant@google.com> | 2010-04-07 22:58:23 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2010-04-07 22:58:23 +0000 |
commit | 00698fc57c3f25b4a99935bb625aa254c08c6dca (patch) | |
tree | 1378fa715297cca3df93545e7e19a2c36fb15803 /gold/object.cc | |
parent | 7296d9338774c74e5a525f0c8f31c20f367997f5 (diff) | |
download | gdb-00698fc57c3f25b4a99935bb625aa254c08c6dca.zip gdb-00698fc57c3f25b4a99935bb625aa254c08c6dca.tar.gz gdb-00698fc57c3f25b4a99935bb625aa254c08c6dca.tar.bz2 |
* archive.cc (include_member): Destroy Read_symbols_data object before
releasing file.
* object.cc (Read_symbols_data::~Read_symbols_data) New destructor.
* object.h (Read_symbols_data::Read_symbols_data) New constructor.
(Read_symbols_data::~Read_symbols_data) New destructor.
(Section_relocs::Section_relocs) New constructor.
(Section_relocs::~Section_relocs) New destructor.
(Read_relocs_data::Read_relocs_data) New constructor.
(Read_relocs_data::~Read_relocs_data) New destructor.
* testsuite/binary_unittest.cc (Sized_binary_test): Set sd member
pointers to NULL after deleting.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gold/object.cc b/gold/object.cc index b9d0028..8751d55 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -43,6 +43,28 @@ namespace gold { +// Struct Read_symbols_data. + +// Destroy any remaining File_view objects. + +Read_symbols_data::~Read_symbols_data() +{ + if (this->section_headers != NULL) + delete this->section_headers; + if (this->section_names != NULL) + delete this->section_names; + if (this->symbols != NULL) + delete this->symbols; + if (this->symbol_names != NULL) + delete this->symbol_names; + if (this->versym != NULL) + delete this->versym; + if (this->verdef != NULL) + delete this->verdef; + if (this->verneed != NULL) + delete this->verneed; +} + // Class Xindex. // Initialize the symtab_xindex_ array. Find the SHT_SYMTAB_SHNDX |