[PATCH v1] crypto/virtio: free memory used by op cookies
Gowrishankar Muthukrishnan
gmuthukrishn at marvell.com
Sat Oct 11 06:32:34 CEST 2025
Free memory used by virt queue op cookies in dev close.
Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")
Cc: stable at dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Change-Id: Idbf87e6ef5bede3cadfae587b5a6d7592f5d5cf3
---
drivers/crypto/virtio/virtio_cryptodev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index d661ce8025..6f079f15f6 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -68,6 +68,7 @@ void
virtio_crypto_queue_release(struct virtqueue *vq)
{
struct virtio_crypto_hw *hw;
+ uint16_t i;
PMD_INIT_FUNC_TRACE();
@@ -79,6 +80,9 @@ virtio_crypto_queue_release(struct virtqueue *vq)
hw->vqs[vq->vq_queue_index] = NULL;
rte_memzone_free(vq->mz);
rte_mempool_free(vq->mpool);
+ for (i = 0; i < vq->vq_nentries; i++)
+ rte_free(vq->vq_descx[i].cookie);
+
rte_free(vq);
}
}
--
2.37.1
More information about the stable
mailing list