(_("DWARF error: mangled line number section"));
bfd_set_error (bfd_error_bad_value);
line_fail:
- if (filename != NULL)
- free (filename);
+ free (filename);
goto fail;
}
break;
filenum = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read,
FALSE, line_end);
line_ptr += bytes_read;
- if (filename)
- free (filename);
+ free (filename);
filename = concat_filename (table, filenum);
break;
}
}
}
- if (filename)
- free (filename);
+ free (filename);
}
if (unit->line_offset == 0)
table->sequences = table->sequences->prev_sequence;
free (seq);
}
- if (table->files != NULL)
- free (table->files);
- if (table->dirs != NULL)
- free (table->dirs);
+ free (table->files);
+ free (table->dirs);
return NULL;
}
{
struct varinfo * spec_var;
- spec_var = lookup_var_by_offset (attr.u.val, unit->variable_table);
+ spec_var = lookup_var_by_offset (attr.u.val,
+ unit->variable_table);
if (spec_var == NULL)
{
- _bfd_error_handler
- (_("DWARF error: could not find variable specification at offset %lx"),
- (unsigned long) attr.u.val);
+ _bfd_error_handler (_("DWARF error: could not find "
+ "variable specification "
+ "at offset %lx"),
+ (unsigned long) attr.u.val);
break;
}
if (var->name == NULL)
var->name = spec_var->name;
- if (var->file == NULL)
+ if (var->file == NULL && spec_var->file != NULL)
var->file = strdup (spec_var->file);
if (var->line == 0)
var->line = spec_var->line;
free (each->line_table->dirs);
}
- if (each->lookup_funcinfo_table)
- {
- free (each->lookup_funcinfo_table);
- each->lookup_funcinfo_table = NULL;
- }
+ free (each->lookup_funcinfo_table);
+ each->lookup_funcinfo_table = NULL;
while (function_table)
{
- if (function_table->file)
- {
- free (function_table->file);
- function_table->file = NULL;
- }
- if (function_table->caller_file)
- {
- free (function_table->caller_file);
- function_table->caller_file = NULL;
- }
+ free (function_table->file);
+ function_table->file = NULL;
+ free (function_table->caller_file);
+ function_table->caller_file = NULL;
function_table = function_table->prev_func;
}
while (variable_table)
{
- if (variable_table->file)
- {
- free (variable_table->file);
- variable_table->file = NULL;
- }
+ free (variable_table->file);
+ variable_table->file = NULL;
variable_table = variable_table->prev_var;
}
}