Re: [PATCH] objtool: Fix memory leak in decode_instructions()

From: Kamalesh Babulal
Date: Fri Oct 13 2017 - 01:51:12 EST


On Friday 13 October 2017 10:36 AM, Josh Poimboeuf wrote:
On Fri, Oct 13, 2017 at 10:14:36AM +0530, Kamalesh Babulal wrote:
On Thursday 12 October 2017 09:40 PM, Josh Poimboeuf wrote:
On Thu, Oct 12, 2017 at 02:32:14PM +0530, Kamalesh Babulal wrote:
free the allocated insn before returning, when an error occurs
before adding insn to file->insn_list.

Signed-off-by: Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx>

Any chance you're working on porting objtool to ppc64le? :-)

Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>


Thanks for the review. I have started working on it :)

Good! Let me know if you have any questions.

Thank you, I am sure I will have lots of them.


I originally wrote objtool with arch-independence in mind, though with
the new "objtool 2.0" rewrite, it unfortunately became more
x86-specific.

I was hoping to work on making it more arch-independent, and then start
porting it to other arches, but it may be a few months before I have the
time to do so. So any work you want to there would be great.


Sure, will keep that in mind to abstract arch-independent code in to common files and push arch-dependent code into arch/ directory for both ppc64le/x86.

--
cheers,
Kamalesh.