Skip to content
Snippets Groups Projects
Commit 9cf93884 authored by Wang Hai's avatar Wang Hai Committed by Sasha Levin
Browse files

yam: fix possible memory leak in yam_init_driver


[ Upstream commit 98749b71 ]

If register_netdev(dev) fails, free_netdev(dev) needs
to be called, otherwise a memory leak will occur.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 45d44c0c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment