From: Chas Williams Date: Wed, 1 Nov 2017 20:38:20 +0000 (-0400) Subject: net/vmxnet3: fix memory leak when releasing queues X-Git-Tag: spdx-start~958 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=aad14460a066e400c1787126972a475b93a52012;p=dpdk.git 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 --- 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); } }