On Thu, 25 Jun 2015 15:30:28 +0100 Bernard Iremonger <bernard.iremonger at intel.com> wrote:
> Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com> > --- > lib/librte_ether/rte_ethdev.c | 8 +++++++- > 1 files changed, 7 insertions(+), 1 deletions(-) > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c > index e13fde5..2404556 100644 > --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -369,8 +369,14 @@ rte_eth_dev_uninit(struct rte_pci_device *pci_dev) > /* free ether device */ > rte_eth_dev_release_port(eth_dev); > > - if (rte_eal_process_type() == RTE_PROC_PRIMARY) > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + 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->mac_addrs); > + rte_free(eth_dev->data->hash_mac_addrs); > + memset(eth_dev->data, 0, sizeof(struct rte_eth_dev_data)); Glad to see this problem addressed. I would prefer that the component that created the object be responsible for doing its own cleanup.