Re: [EXT] Re: [net-next PATCH] octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs

From: Simon Horman
Date: Mon Dec 18 2023 - 14:12:38 EST


On Mon, Dec 18, 2023 at 06:03:53PM +0000, Suman Ghosh wrote:
> >Hi Suman,
> >
> >I realise that this patch has been accepted.
> >But I believe there is a double-free problem above as mcam-
> >>counters.bmap may be freed twice.
> >And mcam->bmap seems to be leaked.
> >
> >Perhaps the last part of the unwind ladder should be:
> >
> >free_bmap:
> > kfree(mcam->bmap);
> >
> >Double-free flagged by Smatch and Coccinelle.
> [Suman] Thanks Simon for finding it. I have pushed a follow-up patch as a fix.

Likewise, thanks. The fix patch looks good.