[PATCH 02/11] net/dpaa2: fix rx error queue memory leak on port close

Hemant Agrawal hemant.agrawal at oss.nxp.com
Thu Feb 19 12:01:00 CET 2026


On 19-02-2026 16:26, Hemant Agrawal wrote:
>
> On 18-02-2026 21:34, Maxime Leroy wrote:
>> The rx_err_vq is allocated separately with rte_zmalloc() in
>> dpaa2_alloc_rx_tx_queues(), but dpaa2_free_rx_tx_queues() only frees
>> its q_storage contents via dpaa2_queue_storage_free() — the struct
>> dpaa2_queue itself is never freed, leaking memory on every port close.
>>
>> Add the missing rte_free() and NULL assignment.
>>
>> Fixes: 46d02eeaaeb8 ("net/dpaa2: fix queue freeing")
>> Signed-off-by: Maxime Leroy <maxime at leroys.fr>
>> ---
>>   drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c 
>> b/drivers/net/dpaa2/dpaa2_ethdev.c
>> index cef819650b..b75b934b17 100644
>> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
>> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
>> @@ -691,6 +691,8 @@ dpaa2_free_rx_tx_queues(struct rte_eth_dev *dev)
>>           if (priv->flags & DPAAX_RX_ERROR_QUEUE_FLAG) {
>>               dpaa2_q = priv->rx_err_vq;
>>               dpaa2_queue_storage_free(dpaa2_q, RTE_MAX_LCORE);
>> +            rte_free(priv->rx_err_vq);
>> +            priv->rx_err_vq = NULL;
>>           }
>>             /*free memory for all queues (RX+TX) */
> Similar change is also required in error handling path of 
> dpaa2_alloc_rx_tx_queues
ok, you have it covered in 04/11 patch, may be combine this and 04/11 patch


More information about the dev mailing list