Skip to content
Snippets Groups Projects
Commit 429370c4 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Greg Kroah-Hartman
Browse files

net: stmmac: selftests: fix potential memleak in stmmac_test_arpoffload()


[ Upstream commit f150b63f ]

The skb allocated by stmmac_test_get_arp_skb() hasn't been released in
some error handling case, which will lead to a memory leak. Fix this up
by adding kfree_skb() to release skb.

Compile tested only.

Fixes: 5e3fb0a6 ("net: stmmac: selftests: Implement the ARP Offload test")
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bba527e4
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