* section.c (bfd_make_section_anyway): Release newsect ptr when
newsect->symbol fails to alloc. Use bfd_release instead of free.
This commit is contained in:
parent
120abad8b7
commit
4d7ce4dd48
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -795,7 +795,10 @@ bfd_make_section_anyway (abfd, name)
|
|||
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;
|
||||
|
@ -805,7 +808,7 @@ bfd_make_section_anyway (abfd, name)
|
|||
|
||||
if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true)
|
||||
{
|
||||
free (newsect);
|
||||
bfd_release (abfd, newsect);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue