From: Alan Modra Date: Tue, 10 Oct 2000 15:23:38 +0000 (+0000) Subject: * section.c (bfd_make_section_anyway): Release newsect ptr when X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d7ce4dd486816139276a2c5cf90e0213fb47b21;p=binutils-gdb.git * section.c (bfd_make_section_anyway): Release newsect ptr when newsect->symbol fails to alloc. Use bfd_release instead of free. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 249a4bf2253..5ab46c3b1e3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2000-10-10 Tom Rix + + * 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 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; }