From: Mauricio Vasquez B Date: Fri, 20 Nov 2015 18:24:19 +0000 (+0100) Subject: ring: fix memory leak when detaching X-Git-Tag: spdx-start~8011 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d082c0395bf6;p=dpdk.git ring: fix memory leak when detaching When freeing the device it is also neccesary to free rx_queues and tx_queues Signed-off-by: Mauricio Vasquez B --- diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 9a31bcea1f..d92b08872c 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -582,7 +582,12 @@ rte_pmd_ring_devuninit(const char *name) return -ENODEV; eth_dev_stop(eth_dev); - rte_free(eth_dev->data->dev_private); + + if (eth_dev->data) { + rte_free(eth_dev->data->rx_queues); + rte_free(eth_dev->data->tx_queues); + rte_free(eth_dev->data->dev_private); + } rte_free(eth_dev->data); rte_eth_dev_release_port(eth_dev);