Browse Source

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 <dan.carpenter@oracle.com>
Acked-by: Veaceslav Falico <vfalico@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter 11 years ago
parent
commit
a67eed571a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/net/bonding/bond_main.c

+ 1 - 2
drivers/net/bonding/bond_main.c

@@ -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);
 	}
 }