Skip to content
Commit 8ee7ef4a authored by Fugang Duan's avatar Fugang Duan Committed by Greg Kroah-Hartman
Browse files

net: fec: fix the potential memory leak in fec_enet_init()



[ Upstream commit 619fee9e ]

If the memory allocated for cbd_base is failed, it should
free the memory allocated for the queues, otherwise it causes
memory leak.

And if the memory allocated for the queues is failed, it can
return error directly.

Fixes: 59d0f746 ("net: fec: init multi queue date structure")
Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9c386011
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment