+2007-08-08 Michael Snyder <msnyder@access-company.com>
+
+ * dwarf2read.c (add_partial_symbol): Memory leak.
+
2007-08-06 Michael Snyder <msnyder@access-company.com>
* ada-lang.c (desc_bounds): Comparison of function address to NULL.
{
struct objfile *objfile = cu->objfile;
CORE_ADDR addr = 0;
- char *actual_name;
+ char *actual_name = NULL;
const char *my_prefix;
const struct partial_symbol *psym = NULL;
CORE_ADDR baseaddr;
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- actual_name = NULL;
-
if (pdi_needs_namespace (pdi->tag))
{
actual_name = partial_die_full_name (pdi, cu);
{
/* Static Variable. Skip symbols without location descriptors. */
if (pdi->locdesc == NULL)
- return;
+ {
+ if (built_actual_name)
+ xfree (actual_name);
+ return;
+ }
addr = decode_locdesc (pdi->locdesc, cu);
/*prim_record_minimal_symbol (actual_name, addr + baseaddr,
mst_file_data, objfile); */
union or class entry that does not have a byte size attribute
and that has a DW_AT_declaration attribute." */
if (!pdi->has_byte_size && pdi->is_declaration)
- return;
+ {
+ if (built_actual_name)
+ xfree (actual_name);
+ return;
+ }
/* NOTE: carlton/2003-10-07: See comment in new_symbol about
static vs. global. */