staging: otus: 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>
This commit is contained in:
parent
b37e0c619d
commit
2166abebc5
@ -690,7 +690,7 @@ void usbdrv_clear_structs(struct net_device *dev)
|
||||
|
||||
kfree(macp);
|
||||
|
||||
kfree(dev);
|
||||
free_netdev(dev);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user