crypto/dpaa2_sec: fix session clearing
authorAkhil Goyal <akhil.goyal@nxp.com>
Wed, 27 Mar 2019 11:53:30 +0000 (11:53 +0000)
committerAkhil Goyal <akhil.goyal@nxp.com>
Tue, 2 Apr 2019 14:50:24 +0000 (16:50 +0200)
private data should be cleared instead of the complete session

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c

index c2c2251..d955ffc 100644 (file)
@@ -2912,7 +2912,7 @@ dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
                rte_free(s->ctxt);
                rte_free(s->cipher_key.data);
                rte_free(s->auth_key.data);
-               memset(sess, 0, sizeof(dpaa2_sec_session));
+               memset(s, 0, sizeof(dpaa2_sec_session));
                struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
                set_sym_session_private_data(sess, index, NULL);
                rte_mempool_put(sess_mp, sess_priv);