This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] BFD ieee.c fix
- To: Nick Clifton <nickc at redhat dot com>
- Subject: Re: [patch] BFD ieee.c fix
- From: cgd at sibyte dot com (Chris G. Demetriou)
- Date: 18 Oct 2000 12:28:35 -0700
- Cc: binutils at sourceware dot cygnus dot com
- References: <200010181922.MAA07469@elmo.cygnus.com>
Nick Clifton <nickc@redhat.com> writes:
> Well hold on there, there may still be a memory leak. In the function
> we are looking at, the first instance of "goto got_wrong_format_error"
> does not call bfd_release(), but the second one does. (And the memory
> being released was allocated at the start of the function, before the
> first goto). This implies that either the call to bfd_release by the
> second goto is wrong, or that it is OK and the first goto also ought
> to call bfd_release.
yup -- that was the logic that got me to making the change and
submitting it.
the thought in response to Alan's mail, that maybe there wasn't a leak
after all, came from logic like: if code later called bfd_release on
an earlier-allocated object, the code allocated there would be freed,
so there'd be temporarily-greater use of memory, but it wouldn't last
"forever." I dunno if that'd happen though (and it seems moot at this
point).
thanks,
chris