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

From: Suman Ghosh
Date: Mon Dec 18 2023 - 13:04:21 EST


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