From 225735428c534155dbafc4132d79e47597c14c6d Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Fri, 2 Jul 2021 16:06:36 +0530 Subject: [PATCH] crypto/octeontx2: clear session data upon destroy During session destroy, clear session private memory. Signed-off-by: Anoob Joseph --- drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c index 3c5686a42c..a5db40047d 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c @@ -589,6 +589,8 @@ otx2_crypto_sec_session_destroy(void *device __rte_unused, sess_mp = rte_mempool_from_obj(priv); + memset(priv, 0, sizeof(*priv)); + set_sec_session_private_data(sess, NULL); rte_mempool_put(sess_mp, priv); -- 2.20.1