Skip to content

Commit

Permalink
lantiq_etop: use free_netdev(netdev) instead of kfree()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Mar 21, 2013
1 parent 73214f5 commit cb0e51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/lantiq_etop.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ ltq_etop_probe(struct platform_device *pdev)
return 0;

err_free:
kfree(dev);
free_netdev(dev);
err_out:
return err;
}
Expand Down

0 comments on commit cb0e51d

Please sign in to comment.