lkml.org 
[lkml]   [2022]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ethernet: marvell: octeontx2 Fix resource not freed after malloc
Hi,

On Tue, Oct 18, 2022 at 1:27 AM Manank Patel <pmanank200502@gmail.com> wrote:
>
> fix rxsc not getting freed before going out of scope
>
> Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
>
> Signed-off-by: Manank Patel <pmanank200502@gmail.com>
> ---
> drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> index 9809f551fc2e..c7b2ebb2c75b 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> @@ -870,6 +870,7 @@ static struct cn10k_mcs_rxsc *cn10k_mcs_create_rxsc(struct otx2_nic *pfvf)
> cn10k_mcs_free_rsrc(pfvf, MCS_RX, MCS_RSRC_TYPE_FLOWID,
> rxsc->hw_flow_id, false);
> fail:
> + kfree(rxsc);

Thanks for the fix. Can you do the same in cn10k_mcs_create_txsc as well.

Sundeep

> return ERR_PTR(ret);
> }
>
> --
> 2.38.0
>

\
 
 \ /
  Last update: 2022-10-18 05:55    [W:0.099 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site