[patch] BFD ieee.c fix
Chris G. Demetriou
cgd@sibyte.com
Wed Oct 18 12:29:00 GMT 2000
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
More information about the Binutils
mailing list