From: Tiwei Bie Date: Wed, 5 Jun 2019 09:43:38 +0000 (+0800) Subject: net/virtio: fix queue memory leak on error X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2b38151f745a30ebe653a202563bf8539740633f;p=dpdk.git 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 --- 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; } }