提交 a67eed57 编写于 作者: D Dan Carpenter 提交者: David S. Miller

bonding: fix a memory leak in bond_arp_send_all()

This test is reversed so the memory is always leaked.  It's better style
to remove the test anyway.

Fixes: 3e403a77 ('bonding: make it possible to have unlimited nested upper vlans')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NVeaceslav Falico <vfalico@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d87de1f3
......@@ -2287,8 +2287,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
ip_rt_put(rt);
bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
addr, tags);
if (!tags)
kfree(tags);
kfree(tags);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册