DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/hns3: fix incorrect free function
@ 2021-10-13  8:09 Min Hu (Connor)
  2021-10-13 12:00 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Min Hu (Connor) @ 2021-10-13  8:09 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas

From: Chengwen Feng <fengchengwen@huawei.com>

The intr_handle->intr_vec is allocated by rte_zmalloc(), but freed by
free(), this patch fixes it.

Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index f3cc190d1c..e896de58a4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2358,7 +2358,7 @@ hns3vf_map_rx_interrupt(struct rte_eth_dev *dev)
 	return 0;
 
 vf_bind_vector_error:
-	free(intr_handle->intr_vec);
+	rte_free(intr_handle->intr_vec);
 	intr_handle->intr_vec = NULL;
 vf_alloc_intr_vec_error:
 	rte_intr_efd_disable(intr_handle);
-- 
2.33.0


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

* Re: [dpdk-dev] [PATCH] net/hns3: fix incorrect free function
  2021-10-13  8:09 [dpdk-dev] [PATCH] net/hns3: fix incorrect free function Min Hu (Connor)
@ 2021-10-13 12:00 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-10-13 12:00 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: thomas

On 10/13/2021 9:09 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> The intr_handle->intr_vec is allocated by rte_zmalloc(), but freed by
> free(), this patch fixes it.
> 
> Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2021-10-13 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  8:09 [dpdk-dev] [PATCH] net/hns3: fix incorrect free function Min Hu (Connor)
2021-10-13 12:00 ` 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).