Re: [PATH v2] bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2025 at 11:57 PM chenyuan <chenyuan_fl@xxxxxxx> wrote:
>
> From: chenyuan <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.
>
> Fix: 7900efc19214 ("tools/bpf: bpftool: improve output format for bpftool net")
> Signed-off-by: chenyuan <chenyuan@xxxxxxxxxx>

SOB and Author field should have full name as "First Last".

pw-bot: cr





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux