Skip to content

Commit a67eed5

Browse files
Dan Carpenterdavem330
authored andcommitted
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: 3e403a7 ('bonding: make it possible to have unlimited nested upper vlans') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d87de1f commit a67eed5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/net/bonding/bond_main.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,8 +2287,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
22872287
ip_rt_put(rt);
22882288
bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
22892289
addr, tags);
2290-
if (!tags)
2291-
kfree(tags);
2290+
kfree(tags);
22922291
}
22932292
}
22942293

0 commit comments

Comments
 (0)