Improper cleanup resulted in a segfault when more
than 1 device was used
Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Radu Nicolau <[email protected]>
---
drivers/crypto/virtio/virtio_cryptodev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c
b/drivers/crypto/virtio/virtio_cryptodev.c
index fa215fe528..c16b9fcc86 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -625,8 +625,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
cryptodev->enqueue_burst = NULL;
cryptodev->dequeue_burst = NULL;
- rte_free(cryptodev->data);
- cryptodev->data = NULL;
+ rte_cryptodev_pmd_release_device(cryptodev);
VIRTIO_CRYPTO_DRV_LOG_INFO("dev_uninit completed");
--
2.43.0