Re: [PATCH net] bnx2x: fix potential memory leak in bnx2x_alloc_mem_bp()
From: Simon Horman
Date: Mon Jun 22 2026 - 09:08:13 EST
On Sat, Jun 20, 2026 at 11:53:50AM +0530, Abdun Nihaal wrote:
> If the allocation of fp[i].tpa_info fails, the error path will not free
> the struct bnx2x_fastpath allocated earlier, as it is not linked to the
> bp structure yet. Fix that by linking it immediately after allocation.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 15192a8cf8a8 ("bnx2x: Split the FP structure")
> Signed-off-by: Abdun Nihaal <nihaal@xxxxxxxxxxxxxx>
> ---
> Compile tested only. Issue found using static analysis.
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
FTR, there is an AI-generated review of this patch available on sashiko.dev.
While I don't think that should effect the progress of this patch you may
want to consider it in the context of follow-up.