[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <jekn3cgvy4jxww3x3f42crvpx3iqh3b7e7nj5bzz46dve7emso@n2vtbf4z2f6k>
Date: Mon, 22 Sep 2025 13:10:47 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: liujing <liujing@...s.chinamobile.com>
Cc: peterz@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] objtool: fix memory leak in tools/objtool/elf.c
On Mon, Sep 22, 2025 at 05:03:24PM +0800, liujing wrote:
> If calloc succeeds but malloc fails (i.e., sym != NULL but name == NULL),
> then memory has already been allocated for sym via calloc, but atthis
> point sym is not freed, leading to a memory leak.
>
> Signed-off-by: liujing <liujing@...s.chinamobile.com>
We intentionally don't fix most memory leaks, objtool has a short
runtime and all the memory gets freed on exit anyway.
--
Josh
Powered by blists - more mailing lists