Re: [PATCH net] ethernet: aeroflex: fix potential skb leak in greth_init_rings()

From: Leon Romanovsky
Date: Mon Dec 05 2022 - 02:17:08 EST


On Sun, Dec 04, 2022 at 02:09:08PM +0800, Zhang Changzhong wrote:
> The greth_init_rings() function won't free the newly allocated skb when
> dma_mapping_error() returns error, so add dev_kfree_skb() to fix it.
>
> Compile tested only.
>
> Fixes: d4c41139df6e ("net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
> ---
> drivers/net/ethernet/aeroflex/greth.c | 1 +
> 1 file changed, 1 insertion(+)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>