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

Suman Ghosh
2023-12-18T18:04:09Z

>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.