net/hns3: fix interrupt vector freeing
authorChengwen Feng <fengchengwen@huawei.com>
Wed, 13 Oct 2021 08:09:08 +0000 (16:09 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 13 Oct 2021 11:59:13 +0000 (13:59 +0200)
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>
drivers/net/hns3/hns3_ethdev_vf.c

index f3cc190..e896de5 100644 (file)
@@ -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);