This is the mail archive of the binutils@sources.redhat.com 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] Re: Multiple apparent leaks in dwarf2.c


Hi John,

Here's a patch that fixes up the issues I found in dwarf2.c. With this
patch applied to CVS, our application is valgrind-clean.

Thanks very much for submitting this. I have applied your patch together with this ChangeLog entry:


bfd/ChangeLog
2005-05-05  John Levon  <levon@movementarian.org>

	* dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
	allocated memory before returning.
	(decode_line_info): Likewise.
	(_bfd_dwarf2_cleanup_debug_info): New function:  Frees memory
	allocated by functions in this file.
	* elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
	* elf.c (bfd_elf_close_and_cleanup): Call
	_bfd_dwarf2_cleanup_debug_info.

Cheers
  Nick


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