pointer. */
void *
-read_debugging_info (bfd *abfd, asymbol **syms, long symcount, bfd_boolean no_messages)
+read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
+ bfd_boolean no_messages)
{
void *dhandle;
bfd_boolean found;
if (! read_section_stabs_debugging_info (abfd, syms, symcount, dhandle,
&found))
- return NULL;
+ goto err_exit;
if (bfd_get_flavour (abfd) == bfd_target_aout_flavour)
{
if (! read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle,
&found))
- return NULL;
+ goto err_exit;
}
/* Try reading the COFF symbols if we didn't find any stabs in COFF
&& symcount > 0)
{
if (! parse_coff (abfd, syms, symcount, dhandle))
- return NULL;
+ goto err_exit;
found = TRUE;
}
if (! no_messages)
non_fatal (_("%s: no recognized debugging information"),
bfd_get_filename (abfd));
+ err_exit:
+ free (dhandle);
return NULL;
}
sc[strlen (sc) - 1] = '\0';
n = concat (sc, bfd_asymbol_name (*ps), (const char *) NULL);
free (sc);
- if (f != NULL)
- free (f);
+ free (f);
f = n;
s = n;
}
static void
save_stab (int type, int desc, bfd_vma value, const char *string)
{
- if (saved_stabs[saved_stabs_index].string != NULL)
- free (saved_stabs[saved_stabs_index].string);
+ free (saved_stabs[saved_stabs_index].string);
saved_stabs[saved_stabs_index].type = type;
saved_stabs[saved_stabs_index].desc = desc;
saved_stabs[saved_stabs_index].value = value;
for (i = 0; i < SAVE_STABS_COUNT; i++)
{
- if (saved_stabs[i].string != NULL)
- {
- free (saved_stabs[i].string);
- saved_stabs[i].string = NULL;
- }
+ free (saved_stabs[i].string);
+ saved_stabs[i].string = NULL;
}
saved_stabs_index = 0;