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>
This commit is contained in:
parent
73214f5d9f
commit
cb0e51d806
1 changed files with 1 additions and 1 deletions
|
@ -769,7 +769,7 @@ ltq_etop_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_free:
|
||||
kfree(dev);
|
||||
free_netdev(dev);
|
||||
err_out:
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue