mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
* 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.
This commit is contained in:
@@ -55,6 +55,13 @@ class Stringpool_template;
|
||||
|
||||
struct Read_symbols_data
|
||||
{
|
||||
Read_symbols_data()
|
||||
: section_headers(NULL), section_names(NULL), symbols(NULL),
|
||||
symbol_names(NULL), versym(NULL), verdef(NULL), verneed(NULL)
|
||||
{ }
|
||||
|
||||
~Read_symbols_data();
|
||||
|
||||
// Section headers.
|
||||
File_view* section_headers;
|
||||
// Section names.
|
||||
@@ -102,6 +109,13 @@ struct Symbol_location_info
|
||||
|
||||
struct Section_relocs
|
||||
{
|
||||
Section_relocs()
|
||||
: contents(NULL)
|
||||
{ }
|
||||
|
||||
~Section_relocs()
|
||||
{ delete this->contents; }
|
||||
|
||||
// Index of reloc section.
|
||||
unsigned int reloc_shndx;
|
||||
// Index of section that relocs apply to.
|
||||
@@ -125,6 +139,13 @@ struct Section_relocs
|
||||
|
||||
struct Read_relocs_data
|
||||
{
|
||||
Read_relocs_data()
|
||||
: local_symbols(NULL)
|
||||
{ }
|
||||
|
||||
~Read_relocs_data()
|
||||
{ delete this->local_symbols; }
|
||||
|
||||
typedef std::vector<Section_relocs> Relocs_list;
|
||||
// The relocations.
|
||||
Relocs_list relocs;
|
||||
|
||||
Reference in New Issue
Block a user