From 2b38151f745a30ebe653a202563bf8539740633f Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Wed, 5 Jun 2019 17:43:38 +0800 Subject: [PATCH] net/virtio: fix queue memory leak on error We should free queues when we failed to initialize the virtio device. Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- 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 c4570bbf89..df3a218a8f 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.20.1