crypto/dpaa: fix session destroy

Coverity issue: 336798
Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload")
Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")
Cc: stable@dpdk.org

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
Akhil Goyal 2019-04-17 15:58:14 +05:30
parent 2cb4a0d44b
commit 261fb94185
2 changed files with 2 additions and 2 deletions

View File

@ -2836,7 +2836,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
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));
set_sec_session_private_data(sess, NULL);
rte_mempool_put(sess_mp, sess_priv);
}

View File

@ -2453,7 +2453,7 @@ dpaa_sec_security_session_destroy(void *dev __rte_unused,
rte_free(s->cipher_key.data);
rte_free(s->auth_key.data);
memset(sess, 0, sizeof(dpaa_sec_session));
memset(s, 0, sizeof(dpaa_sec_session));
set_sec_session_private_data(sess, NULL);
rte_mempool_put(sess_mp, sess_priv);
}