summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cortina/gemini.c
diff options
context:
space:
mode:
authorIgor Pylypiv <igor.pylypiv@gmail.com>2018-03-18 23:40:51 -0700
committerDavid S. Miller <davem@davemloft.net>2018-03-20 12:08:45 -0400
commit44caebd368a5174f8aa7b80076350385eb2c2f42 (patch)
tree5beb0c858cf8b29d21757a2bb0d853baacfa353f /drivers/net/ethernet/cortina/gemini.c
parent00777fac28ba3e126b9e63e789a613e8bd2cab25 (diff)
downloadlinux-44caebd368a5174f8aa7b80076350385eb2c2f42.tar.bz2
net: gemini: fix memory leak
cppcheck report: [drivers/net/ethernet/cortina/gemini.c:543]: (error) Memory leak: skb_tab Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cortina/gemini.c')
-rw-r--r--drivers/net/ethernet/cortina/gemini.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index 5eb999af2c40..bd3f6e4d1341 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;
}