This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PowerPC targets minor memory leaks found by Coverity


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]