From: Anoob Joseph Date: Fri, 2 Jul 2021 10:36:36 +0000 (+0530) Subject: crypto/octeontx2: clear session data upon destroy X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=225735428c534155dbafc4132d79e47597c14c6d;p=dpdk.git crypto/octeontx2: clear session data upon destroy During session destroy, clear session private memory. Signed-off-by: Anoob Joseph --- 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);