newsect->symbol fails to alloc. Use bfd_release instead of free.
+2000-10-10 Tom Rix <trix@redhat.com>
+
+ * section.c (bfd_make_section_anyway): Release newsect ptr when
+ newsect->symbol fails to alloc. Use bfd_release instead of free.
+
2000-10-09 Richard Henderson <rth@cygnus.com
* elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
section. */
newsect->symbol = bfd_make_empty_symbol (abfd);
if (newsect->symbol == NULL)
- return NULL;
+ {
+ bfd_release (abfd, newsect);
+ return NULL;
+ }
newsect->symbol->name = name;
newsect->symbol->value = 0;
newsect->symbol->section = newsect;
if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true)
{
- free (newsect);
+ bfd_release (abfd, newsect);
return NULL;
}