[PATCH] Re: Multiple apparent leaks in dwarf2.c
Nick Clifton
nickc@redhat.com
Thu May 5 14:34:00 GMT 2005
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
More information about the Binutils
mailing list