Files
linux/drivers/net/ethernet/wangxun
Zhengchao Shao 2371e1ecd4 net: libwx: fix memory leak in wx_setup_rx_resources
[ Upstream commit e315e7b83a ]

When wx_alloc_page_pool() failed in wx_setup_rx_resources(), it doesn't
release DMA buffer. Add dma_free_coherent() in the error path to release
the DMA buffer.

Fixes: 850b971110 ("net: libwx: Allocate Rx and Tx resources")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230418065450.2268522-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:17:21 +09:00
..
2022-10-28 11:25:53 +01:00