rionet: use free_netdev(netdev) instead of kfree()
authorKulikov Vasiliy <segooon@gmail.com>
Sat, 25 Sep 2010 23:58:03 +0000 (23:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2010 01:54:33 +0000 (18:54 -0700)
commit22138d307329e1968fc698821095b87c2fd5de12
tree6c1a822fd4fbbda87cb64644920adb0923f51a23
parent52933f052186877afd218aef7a1b2dbdb010939f
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>
drivers/net/rionet.c