[PATCH v2 1/7] baseband/acc: acc100 free harq layout pointer

Maxime Coquelin maxime.coquelin at redhat.com
Fri Jan 6 09:53:29 CET 2023



On 1/6/23 06:44, Hernan Vargas wrote:
> Explicitly call rte_free for harq_layout pointer in dev_close function
> to prevent memory leak.
> 
> Fixes: ba2262fe16c ("baseband/acc100: fix close cleanup")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
> ---
>   drivers/baseband/acc/rte_acc100_pmd.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
> index ba8247d47e..0177a9e0ea 100644
> --- a/drivers/baseband/acc/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> @@ -622,6 +622,7 @@ acc100_dev_close(struct rte_bbdev *dev)
>   		rte_free(d->tail_ptrs);
>   		rte_free(d->info_ring);
>   		rte_free(d->sw_rings_base);
> +		rte_free(d->harq_layout);
>   		d->sw_rings_base = NULL;
>   		d->tail_ptrs = NULL;
>   		d->info_ring = NULL;

Please set d->harq_layout to NULL for consistency and to prevent double
free.

Maxime



More information about the stable mailing list