crypto/octeontx2: clear session data upon destroy
authorAnoob Joseph <anoobj@marvell.com>
Fri, 2 Jul 2021 10:36:36 +0000 (16:06 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 7 Jul 2021 19:28:39 +0000 (21:28 +0200)
During session destroy, clear session private memory.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
drivers/crypto/octeontx2/otx2_cryptodev_sec.c

index 3c5686a..a5db400 100644 (file)
@@ -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);