* [PATCH] net: gemini: fix memory leak
@ 2018-03-19 6:40 Igor Pylypiv
2018-03-20 0:58 ` Linus Walleij
2018-03-20 16:09 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Igor Pylypiv @ 2018-03-19 6:40 UTC (permalink / raw)
To: linux-arm-kernel
cppcheck report:
[drivers/net/ethernet/cortina/gemini.c:543]: (error) Memory leak: skb_tab
Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com>
---
drivers/net/ethernet/cortina/gemini.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index 5eb999a..bd3f6e4 100644
--- a/drivers/net/ethernet/cortina/gemini.c
+++ b/drivers/net/ethernet/cortina/gemini.c
@@ -540,6 +540,7 @@ static int gmac_setup_txqs(struct net_device *netdev)
if (port->txq_dma_base & ~DMA_Q_BASE_MASK) {
dev_warn(geth->dev, "TX queue base it not aligned\n");
+ kfree(skb_tab);
return -ENOMEM;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-20 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 6:40 [PATCH] net: gemini: fix memory leak Igor Pylypiv
2018-03-20 0:58 ` Linus Walleij
2018-03-20 16:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).