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/archive.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/archive.cc')
-rw-r--r-- | gold/archive.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gold/archive.cc b/gold/archive.cc index c62fb24..36e4862 100644 --- a/gold/archive.cc +++ b/gold/archive.cc @@ -877,10 +877,12 @@ Archive::include_member(Symbol_table* symtab, Layout* layout, delete obj; else { - Read_symbols_data sd; - obj->read_symbols(&sd); - obj->layout(symtab, layout, &sd); - obj->add_symbols(symtab, &sd, layout); + { + Read_symbols_data sd; + obj->read_symbols(&sd); + obj->layout(symtab, layout, &sd); + obj->add_symbols(symtab, &sd, layout); + } // If this is an external member of a thin archive, unlock the file // for the next task. |