DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] net/netvsc: fix txq leak in error path
@ 2020-09-29 13:44 wangyunjian
  2020-09-30 22:27 ` Long Li
  2020-10-07  2:06 ` [dpdk-dev] [PATCH v2] " wangyunjian
  0 siblings, 2 replies; 6+ messages in thread
From: wangyunjian @ 2020-09-29 13:44 UTC (permalink / raw)
  To: dev
  Cc: sthemmin, kys, haiyangz, longli, jerry.lilijun, xudingke,
	Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

In hn_dev_tx_queue_setup() allocated memory for txq,
we should free it when error happens, otherwise it
will lead to memory leak.

Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/netvsc/hn_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 65f1abae5..8c94e7ee3 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -273,6 +273,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 			     " (tx_free_thresh=%u port=%u queue=%u)\n",
 			     nb_desc - 3,
 			     tx_free_thresh, dev->data->port_id, queue_idx);
+		rte_free(txq);
 		return -EINVAL;
 	}
 
-- 
2.23.0


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

end of thread, other threads:[~2020-10-09 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 13:44 [dpdk-dev] [PATCH] net/netvsc: fix txq leak in error path wangyunjian
2020-09-30 22:27 ` Long Li
2020-10-02 14:25   ` Yunjian Wang
2020-10-07  2:06 ` [dpdk-dev] [PATCH v2] " wangyunjian
2020-10-09  3:53   ` Long Li
2020-10-09 11:36     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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).