Skip to contentSkip to conversation

net/hns3: fix incorrect free function

PATCH Applied Min Hu (Connor) 2 participants 2 messages Oct 13, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/hns3: fix incorrect free function

From: Chengwen Feng <[email protected]>

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")
---
 drivers/net/hns3/hns3_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hns3/hns3_ethdev_vf.c +1 -1
index f3cc190d1c..e896de58a4 100644
@@ -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);
Signature · 1 line
2.33.0