+2007-07-30 Michael Snyder <msnyder@access-company.com>
+
+ * coffgen.c (_bfd_coff_read_internal_relocs): Revert change of
+ 2007-07-26. Buffer still in use, can't be freed.
+
2007-07-27 Michael Snyder <msnyder@access-company.com>
* cofflink.c (coff_link_add_symbols): Return if count is zero.
free_external = NULL;
}
- if (free_internal != NULL)
+ if (cache && free_internal != NULL)
{
- if (cache)
- free (free_internal);
- else
+ if (coff_section_data (abfd, sec) == NULL)
{
- if (coff_section_data (abfd, sec) == NULL)
- {
- amt = sizeof (struct coff_section_tdata);
- sec->used_by_bfd = bfd_zalloc (abfd, amt);
- if (sec->used_by_bfd == NULL)
- goto error_return;
- coff_section_data (abfd, sec)->contents = NULL;
- }
- coff_section_data (abfd, sec)->relocs = free_internal;
+ amt = sizeof (struct coff_section_tdata);
+ sec->used_by_bfd = bfd_zalloc (abfd, amt);
+ if (sec->used_by_bfd == NULL)
+ goto error_return;
+ coff_section_data (abfd, sec)->contents = NULL;
}
+ coff_section_data (abfd, sec)->relocs = free_internal;
}
return internal_relocs;