]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
lantiq_etop: use free_netdev(netdev) instead of kfree()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 20 Mar 2013 21:31:42 +0000 (21:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Mar 2013 15:50:10 +0000 (11:50 -0400)
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>
drivers/net/ethernet/lantiq_etop.c

index 6a2127489af78e718264f202737ba0667770ba1b..bfdb06860397e720a848d6e8cab7b324ded6ea1c 100644 (file)
@@ -769,7 +769,7 @@ ltq_etop_probe(struct platform_device *pdev)
        return 0;
 
 err_free:
-       kfree(dev);
+       free_netdev(dev);
 err_out:
        return err;
 }