summaryrefslogtreecommitdiffstats
path: root/drivers/net/rionet.c
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-09-25 23:58:03 +0000
committerDavid S. Miller <davem@davemloft.net>2010-09-26 18:54:33 -0700
commit22138d307329e1968fc698821095b87c2fd5de12 (patch)
tree6c1a822fd4fbbda87cb64644920adb0923f51a23 /drivers/net/rionet.c
parent52933f052186877afd218aef7a1b2dbdb010939f (diff)
downloadlinux-22138d307329e1968fc698821095b87c2fd5de12.tar.gz
linux-22138d307329e1968fc698821095b87c2fd5de12.tar.bz2
linux-22138d307329e1968fc698821095b87c2fd5de12.zip
rionet: use free_netdev(netdev) instead of kfree()
Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/rionet.c')
-rw-r--r--drivers/net/rionet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index 07eb884ff982..44150f2f7bfd 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -384,7 +384,7 @@ static void rionet_remove(struct rio_dev *rdev)
free_pages((unsigned long)rionet_active, rdev->net->hport->sys_size ?
__ilog2(sizeof(void *)) + 4 : 0);
unregister_netdev(ndev);
- kfree(ndev);
+ free_netdev(ndev);
list_for_each_entry_safe(peer, tmp, &rionet_peers, node) {
list_del(&peer->node);