This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix memory leak on bfd_close(BFD_IN_MEMORY)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 8 Aug 2006 13:48:57 -0400
- Subject: Re: [patch] Fix memory leak on bfd_close(BFD_IN_MEMORY)
- References: <20060801160653.GA8511@host0.dyn.jankratochvil.net>
On Tue, Aug 01, 2006 at 06:06:53PM +0200, Jan Kratochvil wrote:
> I feel the patch
> 2004-10-24 Daniel Jacobowitz <dan@debian.org>
>
> * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
>
> introduced a memory leak. This codepath occurs only on ia64 on the second run:
Well, it was already there, I think. Anyway, the master copy of BFD
belongs to the binutils project; you should send patches for it to the
binutils@ list.
I don't think your patch is quite right since bim is not always
malloc'd. It's sometimes bfd_alloc'd. Doing that more often might be
a better solution.
--
Daniel Jacobowitz
CodeSourcery