net/vmxnet3: fix memory leak when releasing queues
authorChas Williams <chas3@att.com>
Wed, 1 Nov 2017 20:38:20 +0000 (16:38 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 2 Nov 2017 23:07:07 +0000 (00:07 +0100)
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 <chas3@att.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
drivers/net/vmxnet3/vmxnet3_rxtx.c

index 437dcb1..aa396ab 100644 (file)
@@ -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);
        }
 }