[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQLy0_FsjRLt2n9R0Rs90VvLQYbkSiji6usaoB_bf4+tYg@mail.gmail.com>
Date: Thu, 19 Jun 2025 08:55:29 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: chenyuan <chenyuan_fl@....com>
Cc: Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>, bpf <bpf@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, chenyuan <chenyuan@...inos.cn>
Subject: Re: [PATH v2] bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure
On Wed, Jun 18, 2025 at 11:57 PM chenyuan <chenyuan_fl@....com> wrote:
>
> From: chenyuan <chenyuan@...inos.cn>
>
> In function dump_xx_nlmsg(), when realloc() fails to allocate memory,
> the original pointer to the buffer is overwritten with NULL. This causes
> a memory leak because the previously allocated buffer becomes unreachable
> without being freed.
>
> Fix: 7900efc19214 ("tools/bpf: bpftool: improve output format for bpftool net")
> Signed-off-by: chenyuan <chenyuan@...inos.cn>
SOB and Author field should have full name as "First Last".
pw-bot: cr
Powered by blists - more mailing lists