Message ID | 20140725122121.GC528@mwanda |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Fri, Jul 25, 2014 at 03:21:21PM +0300, Dan Carpenter wrote: >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> Indeed, dunno how I've missed that. And kfree() verifies for the NULL situation. Acked-by: Veaceslav Falico <vfalico@gmail.com> > >diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c >index 023ec36..f0f5eab 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); > } > } > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Dan Carpenter <dan.carpenter@oracle.com> Date: Fri, 25 Jul 2014 15:21:21 +0300 > 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> Applied, but in the future please make "net-next" submissions explicit by saying something like "[PATCH net-next] " in your subject. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 023ec36..f0f5eab 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); } }
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> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html