aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2010-04-07 22:58:23 +0000
committerCary Coutant <ccoutant@google.com>2010-04-07 22:58:23 +0000
commit00698fc57c3f25b4a99935bb625aa254c08c6dca (patch)
tree1378fa715297cca3df93545e7e19a2c36fb15803 /gold/testsuite
parent7296d9338774c74e5a525f0c8f31c20f367997f5 (diff)
downloadgdb-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/testsuite')
-rw-r--r--gold/testsuite/binary_unittest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/testsuite/binary_unittest.cc b/gold/testsuite/binary_unittest.cc
index b2e14df..8e95062 100644
--- a/gold/testsuite/binary_unittest.cc
+++ b/gold/testsuite/binary_unittest.cc
@@ -87,9 +87,13 @@ Sized_binary_test()
Read_symbols_data sd;
object->read_symbols(&sd);
delete sd.section_headers;
+ sd.section_headers = NULL;
delete sd.section_names;
+ sd.section_names = NULL;
delete sd.symbols;
+ sd.symbols = NULL;
delete sd.symbol_names;
+ sd.symbol_names = NULL;
Sized_relobj<size, big_endian>* relobj =
static_cast<Sized_relobj<size, big_endian>*>(object);