Re: [PATCH] staging: mt7621-eth: Fix memory leaks in mtk_add_mac() error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 15, 2018 at 01:53:03AM +0300, Kamal Heib wrote:
> @@ -2045,6 +2049,12 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
>  		   eth->netdev[id]->base_addr, eth->netdev[id]->irq);
>  
>  	return 0;
> +
> +free_hw_stats:
> +	devm_kfree(eth->dev, mac->hw_stats);

You shouldn't need to free devm data.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux