ethdev: free queue array when closing
authorBernard Iremonger <bernard.iremonger@intel.com>
Mon, 13 Jul 2015 13:04:05 +0000 (14:04 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 19 Jul 2015 19:16:09 +0000 (21:16 +0200)
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
lib/librte_ether/rte_ethdev.c

index d00d104..748e2be 100644 (file)
@@ -1381,6 +1381,11 @@ rte_eth_dev_close(uint8_t port_id)
        FUNC_PTR_OR_RET(*dev->dev_ops->dev_close);
        dev->data->dev_started = 0;
        (*dev->dev_ops->dev_close)(dev);
+
+       rte_free(dev->data->rx_queues);
+       dev->data->rx_queues = NULL;
+       rte_free(dev->data->tx_queues);
+       dev->data->tx_queues = NULL;
 }
 
 int