summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/lantiq_etop.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-20 22:31:42 +0100
committerDavid S. Miller <davem@davemloft.net>2013-03-21 16:50:10 +0100
commitcb0e51d80694fc9964436be1a1a15275e991cb1e (patch)
treeed02c9196dc79c09712c9c113d606f921c558e24 /drivers/net/ethernet/lantiq_etop.c
parentthermal: shorten too long mcast group name (diff)
downloadlinux-cb0e51d80694fc9964436be1a1a15275e991cb1e.tar.xz
linux-cb0e51d80694fc9964436be1a1a15275e991cb1e.zip
lantiq_etop: use free_netdev(netdev) instead of kfree()
Freeing netdev without free_netdev() leads to net, tx leaks. And it may lead to dereferencing freed pointer. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/lantiq_etop.c')
-rw-r--r--drivers/net/ethernet/lantiq_etop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 6a2127489af7..bfdb06860397 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -769,7 +769,7 @@ ltq_etop_probe(struct platform_device *pdev)
return 0;
err_free:
- kfree(dev);
+ free_netdev(dev);
err_out:
return err;
}