提交 20caa14c 编写于 作者: V Vasiliy Kulikov 提交者: Greg Kroah-Hartman

staging: slicoss: 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: NVasiliy Kulikov <segooon@gmail.com>
Acked-by: NDenis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c4711c3a
......@@ -3233,7 +3233,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev)
slic_global.num_slic_cards--;
slic_card_cleanup(card);
}
kfree(dev);
free_netdev(dev);
pci_release_regions(pcidev);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册