This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Fix PowerPC targets minor memory leaks found by Coverity
- From: Alan Modra <amodra at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 27 Jan 2014 10:42:15 +1030
- Subject: Re: [patch] Fix PowerPC targets minor memory leaks found by Coverity
- Authentication-results: sourceware.org; auth=none
- References: <20140124133831 dot GA27933 at host2 dot jankratochvil dot net>
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