All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers/net/ethernet: fix a memory leak
@ 2022-07-22  4:33 Yuanjun Gong
  2022-07-22 10:46 ` Kunihiko Hayashi
  0 siblings, 1 reply; 2+ messages in thread
From: Yuanjun Gong @ 2022-07-22  4:33 UTC (permalink / raw)
  To: Yuanjun Gong, Kunihiko Hayashi, netdev

In ave_remove, ndev should be freed with free_netdev before return.

Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
---
 drivers/net/ethernet/socionext/sni_ave.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index f0c8de2c6075..9d1c1cdd04af 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -1725,6 +1725,7 @@ static int ave_remove(struct platform_device *pdev)
 	unregister_netdev(ndev);
 	netif_napi_del(&priv->napi_rx);
 	netif_napi_del(&priv->napi_tx);
+	free_netdev(ndev);
 
 	return 0;
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-22 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22  4:33 [PATCH 1/1] drivers/net/ethernet: fix a memory leak Yuanjun Gong
2022-07-22 10:46 ` Kunihiko Hayashi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.