]> git.baikalelectronics.ru Git - kernel.git/commit
ibm_newemac: use free_netdev(netdev) instead of kfree()
authorKulikov Vasiliy <segooon@gmail.com>
Sat, 25 Sep 2010 23:58:00 +0000 (23:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2010 01:54:32 +0000 (18:54 -0700)
commit163ce3b8bed8daee6eac7a1d2af5a5f6f0727700
treef2411bac21bebb47f105bb5237baba1ac16b7b16
parentc7a0b89912507b1e6afef603d5d502cb300ffc26
ibm_newemac: 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/ibm_newemac/core.c