From a67eed571aa505f51a4d02cab765a9d4f6ef80c4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 25 Jul 2014 15:21:21 +0300 Subject: [PATCH] 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 Acked-by: Veaceslav Falico Signed-off-by: David S. Miller --- drivers/net/bonding/bond_main.c | 3 +-- 1 file changed, 1 insertion(+), 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); } } -- 2.30.2