summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-07-25 15:21:21 +0300
committerDavid S. Miller <davem@davemloft.net>2014-07-28 17:27:47 -0700
commita67eed571aa505f51a4d02cab765a9d4f6ef80c4 (patch)
treeed767ec3b58683d0cfe2a0ab05ee0eeb758c41a6 /drivers/net
parentd87de1f3e9635b16345bde54306c949417b689ad (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 023ec365209c..f0f5eab0fab1 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/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);
}
}