Set pointer to NULL post rte_crypto_op_free operation.

Fixes: 3bf0db60f5d2 ("test/crypto: add queue pair depth used count")
Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")

Signed-off-by: Nithinsen Kaithakadan <nkaithaka...@marvell.com>
---
 app/test/test_cryptodev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 7535ef6974..5229ac2bf6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -2625,6 +2625,7 @@ test_queue_pair_descriptor_count(void)
 
                rte_pktmbuf_free(ops_deq[i]->sym->m_src);
                rte_crypto_op_free(ops_deq[i]);
+               ops_deq[i] = NULL;
        }
 
        return TEST_SUCCESS;
@@ -14789,6 +14790,7 @@ test_multi_session(void)
 
                /* free crypto operation structure */
                rte_crypto_op_free(ut_params->op);
+               ut_params->op = NULL;
 
                /*
                 * free mbuf - both obuf and ibuf are usually the same,
@@ -14933,6 +14935,7 @@ test_multi_session_random_usage(void)
                                        ut_paramz[j].iv);
 
                rte_crypto_op_free(ut_paramz[j].ut_params.op);
+               ut_paramz[j].ut_params.op = NULL;
 
                /*
                 * free mbuf - both obuf and ibuf are usually the same,
-- 
2.48.1

Reply via email to