We should free queues when we failed to initialize the
virtio device.
Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Cc: [email protected]
Signed-off-by: Tiwei Bie <[email protected]>
---
drivers/net/virtio/virtio_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c
b/drivers/net/virtio/virtio_ethdev.c
index c4570bbf8..df3a218a8 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1752,6 +1752,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t
req_features)
if (eth_dev->data->dev_conf.intr_conf.rxq) {
if (virtio_configure_intr(eth_dev) < 0) {
PMD_INIT_LOG(ERR, "failed to configure interrupt");
+ virtio_free_queues(hw);
return -1;
}
}
--
2.17.1