diff options
author | Vasiliy Kulikov <segooon@gmail.com> | 2010-09-28 21:08:04 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-30 04:14:08 -0700 |
commit | 2166abebc55843409327ddf6cc424cafadd33a30 (patch) | |
tree | c4d1f1ab96f844c6dfe63ca4c5b9647d4a9f7748 /drivers | |
parent | b37e0c619dc231f292ed199f50c18f5bf508e16d (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/otus/usbdrv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/otus/usbdrv.c b/drivers/staging/otus/usbdrv.c index 165a82b9ab8..9a5c4152aac 100644 --- a/drivers/staging/otus/usbdrv.c +++ b/drivers/staging/otus/usbdrv.c @@ -690,7 +690,7 @@ void usbdrv_clear_structs(struct net_device *dev) kfree(macp); - kfree(dev); + free_netdev(dev); } |