From aad14460a066e400c1787126972a475b93a52012 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Wed, 1 Nov 2017 16:38:20 -0400 Subject: [PATCH] net/vmxnet3: fix memory leak when releasing queues At the end of the queue release, we can free the containers for the queue objects. Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation") Cc: stable@dpdk.org Signed-off-by: Chas Williams Reviewed-by: Luca Boccassi --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 437dcb1cce..aa396ab283 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -203,6 +203,8 @@ vmxnet3_dev_tx_queue_release(void *txq) vmxnet3_cmd_ring_release(&tq->cmd_ring); /* Release the memzone */ rte_memzone_free(tq->mz); + /* Release the queue */ + rte_free(tq); } } @@ -223,6 +225,9 @@ vmxnet3_dev_rx_queue_release(void *rxq) /* Release the memzone */ rte_memzone_free(rq->mz); + + /* Release the queue */ + rte_free(rq); } } -- 2.20.1