staging: wlags49_h2: use free_netdev(netdev) instead of kfree()
authorVasiliy Kulikov <segooon@gmail.com>
Tue, 28 Sep 2010 17:08:11 +0000 (21:08 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 30 Sep 2010 11:14:07 +0000 (04:14 -0700)
commitb37e0c619dc231f292ed199f50c18f5bf508e16d
tree7f08707eae44a63c24233d9310a1fd7c06dca0e9
parentc95aef4161c38775d58cca522e4c4b69eb97548e
staging: wlags49_h2: 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: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/wlags49_h2/wl_netdev.c