bonding: fix a memory leak in bond_arp_send_all()
Subsystems (4)
PATCH 1/1 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 3e403a77779f ('bonding: make it possible to have unlimited nested upper vlans')
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/bonding/bond_main.c +1 -2
@@ -2287,8 +2287,7 @@ found:ip_rt_put (rt);bond_arp_send (slave->dev,ARPOP_REQUEST , targets[i], addr, tags); -if (!tags) -kfree (tags); +kfree (tags); } }
Quoted 5 lines · Dan Carpenter
This test is reversed so the memory is always leaked. It's better style to remove the test anyway.
Fixes 3e403a77779f ('bonding: make it possible to have unlimited nested upper vlans')Signed-off-by Dan Carpenter <[email protected]>
Indeed, dunno how I've missed that. And kfree() verifies for the NULL situation.
Acked-by Veaceslav Falico <[email protected]>
Quoted 15 lines
drivers/net/bonding/bond_main.c +1
-2@@ -2287,8 +2287,7 @@ found:ip_rt_put (rt);bond_arp_send (slave->dev,ARPOP_REQUEST , targets[i], addr, tags); -if (!tags) -kfree (tags); +kfree (tags); } }
From: Dan Carpenter <[email protected]>
Date: Fri, 25 Jul 2014 15:21:21 +0300
Quoted 5 lines
This test is reversed so the memory is always leaked. It's better style to remove the test anyway.
Fixes 3e403a77779f ('bonding: make it possible to have unlimited nested upper vlans')Signed-off-by Dan Carpenter <[email protected]>
Applied, but in the future please make "net-next" submissions explicit by saying something like "[PATCH net-next] " in your subject.
Thanks.