Commit ecaf934
net: stmmac: selftests: fix potential memleak in stmmac_test_arpoffload()
[ Upstream commit f150b63 ]
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: 5e3fb0a ("net: stmmac: selftests: Implement the ARP Offload test")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent e1359bc commit ecaf934
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1654 | 1654 | | |
1655 | 1655 | | |
1656 | 1656 | | |
1657 | | - | |
| 1657 | + | |
| 1658 | + | |
1658 | 1659 | | |
| 1660 | + | |
1659 | 1661 | | |
1660 | 1662 | | |
1661 | | - | |
| 1663 | + | |
| 1664 | + | |
1662 | 1665 | | |
| 1666 | + | |
1663 | 1667 | | |
1664 | 1668 | | |
1665 | 1669 | | |
| |||
0 commit comments