This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: [patch] BFD ieee.c fix


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

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