From: Akhil Goyal Date: Wed, 17 Apr 2019 10:28:14 +0000 (+0530) Subject: crypto/dpaa: fix session destroy X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=261fb941858cfe3df7960fa43976436d71af13a2;p=dpdk.git 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 Acked-by: Hemant Agrawal --- diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 5b72b9ee4a..0d273bb624 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -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); } diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 8305f19a31..d9a7cd8a42 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -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); }