summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/lantiq_etop.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-20 21:31:42 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-21 11:50:10 -0400
commitcb0e51d80694fc9964436be1a1a15275e991cb1e (patch)
treeed02c9196dc79c09712c9c113d606f921c558e24 /drivers/net/ethernet/lantiq_etop.c
parent73214f5d9f33b79918b1f7babddd5c8af28dd23d (diff)
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;
}