This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 memory leak on bfd_close(BFD_IN_MEMORY)


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


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