[dpdk-dev,v3,2/2] librte_ether: release queue array memory in close function
diff mbox

Message ID 1436792645-26831-3-git-send-email-bernard.iremonger@intel.com
State Accepted, archived
Headers show

Commit Message

Iremonger, Bernard July 13, 2015, 1:04 p.m. UTC
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Monjalon July 19, 2015, 9:37 p.m. UTC | #1
2015-07-13 14:04, Bernard Iremonger:
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied without the first patch which seems useless.

Patch
diff mbox

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 270697e..04b6212 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1395,6 +1395,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