net/vmxnet3: fix memory leak when releasing queues
Subsystems (2)
PATCH 1/1 net/vmxnet3: fix memory leak when releasing queues
From: Chas Williams <[email protected]>
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")
Signed-off-by <[email protected]>
--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/vmxnet3/vmxnet3_rxtx.c +5 -0
@@ -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); } }
Signature · 1 line
2.9.5
Quoted 34 lines · Chas Williams
From: Chas Williams <[email protected]>
At the end of the queue release, we can free the containers for the queue objects.
Fixes dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driverimplementation")
Signed-off-by <[email protected]>---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 5 +++++1 file changed, 5 insertions(+)drivers/net/vmxnet3/vmxnet3_rxtx.c +2
-0@@ -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); } }drivers/net/vmxnet3/vmxnet3_rxtx.c +0
-0@@ -223,6 +225,9 @@ vmxnet3_dev_rx_queue_release(void *rxq)
/* Release the memzone */
rte_memzone_free(rq->mz);drivers/net/vmxnet3/vmxnet3_rxtx.c +3
-0+ +/* Release the queue */ +rte_free (rq);
Quoted 3 lines
}
}
Reviewed-by Luca Boccassi <[email protected]>
Signature · 2 lines
Kind regards, Luca Boccassi
Ferruh Yigit
AppliedQuoted 6 lines · Luca Boccassi
Quoted 5 lines · Chas Williams
From: Chas Williams <[email protected]>
At the end of the queue release, we can free the containers for the queue objects.
Quoted 6 lines
Quoted 4 lines
Fixes dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driverimplementation")
Signed-off-by <[email protected]>Reviewed-by Luca Boccassi <[email protected]>
Applied to dpdk-next-net/master, thanks.