Re: [PATCH v3] bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure
From: patchwork-bot+netdevbpf
Date: Fri Jun 20 2025 - 14:39:48 EST
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:
On Fri, 20 Jun 2025 09:21:33 +0800 you wrote:
> From: Yuan Chen <chenyuan@xxxxxxxxxx>
>
> 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.
>
> [...]
Here is the summary with links:
- [v3] bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure
https://git.kernel.org/bpf/bpf-next/c/99fe8af069a9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html