This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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] libdwfl: Fix build_id memory leak in dwfl_segment_report_module.


On Mon, 23 Dec 2013 23:28:21 +0100, Mark Wielaard wrote:
> We might already have allocated memory to hold the build_id early in
> consider_notes when we called consider_phdr for the program headers
> we've read from the image. We would leak that memory when we don't use
> it then because we return early/fail. This can be because either we
> didn't find the correct bias or we skip the module because it would
> conflict in address space with any already existing module of DWFL.
> In both cases explicitly free the build_id memory.

I agree with the patch, I have not found any other code path it could leak
through.


Thanks,
Jan

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