[patch] Fix PowerPC targets minor memory leaks found by Coverity
Alan Modra
amodra@gmail.com
Mon Jan 27 00:12:00 GMT 2014
On Fri, Jan 24, 2014 at 02:38:31PM +0100, Jan Kratochvil wrote:
> * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
> return paths. Three times.
This is OK.
> * elf32-ppc.c (ppc_elf_relax_section): Free FIXUPS in error_return
> return path.
This is not OK. There are paths to error_return before fixups have
been allocated and after fixups have been freed. Please change the
error_return free of fixups from a do { } while (); to a while () { }
loop. OK with that change.
> * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
> return paths.
> (ppc64_elf_tls_optimize): Free TOC_REF in return path.
> (ppc64_elf_edit_toc): Free USED in return path.
These are OK.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list