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-Tag: newlib-1_9_0~770 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d7ce4dd486816139276a2c5cf90e0213fb47b21;p=external%2Fbinutils.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 249a4bf..5ab46c3 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; }