[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ym10e9oSyKXOopJv@hirez.programming.kicks-ass.net>
Date: Sat, 30 Apr 2022 19:40:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Tom Rix <trix@...hat.com>
Cc: jpoimboe@...hat.com, mingo@...nel.org, bp@...e.de,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] objtool: rework error handling in objtool_create_backup
On Sat, Apr 30, 2022 at 01:32:40PM -0400, Tom Rix wrote:
> The cppcheck reports this issue
> [tools/objtool/objtool.c:65]: (error) Memory leak: name
>
> This is a general problem. When ojbtool_create_backup() fails anywhere it
> returns an error without freeing any of the buffers it allocates. So
> rework the error handler to goto the appropriate free level when an error
> occurs.
If it fails, objtool terminates. Process termination releases all
resources.
Powered by blists - more mailing lists