* [patch -next] cxgb4: leak on error path in setup_sge_txq_uld()
@ 2016-11-24 11:26 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-11-24 11:26 UTC (permalink / raw)
To: Hariprasad S; +Cc: netdev, kernel-janitors
Freeing "txq_info->uldtxq" is a no-op. We intended to free "txq_info".
Fixes: ab677ff4ad15 ("cxgb4: Allocate Tx queues dynamically")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 565a6c6..8098902 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@ -532,7 +532,7 @@ setup_sge_txq_uld(struct adapter *adap, unsigned int uld_type,
txq_info->uldtxq = kcalloc(txq_info->ntxq, sizeof(struct sge_uld_txq),
GFP_KERNEL);
if (!txq_info->uldtxq) {
- kfree(txq_info->uldtxq);
+ kfree(txq_info);
return -ENOMEM;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-24 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-24 11:26 [patch -next] cxgb4: leak on error path in setup_sge_txq_uld() Dan Carpenter
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).