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 <mauricio.vasquezbernal@studenti.polito.it>
This commit is contained in:
Mauricio Vasquez B 2015-11-20 19:24:19 +01:00 committed by Thomas Monjalon
parent 850d6bb7d5
commit d082c0395b

View File

@ -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);