crypto/dpaa: fix session destroy
authorAkhil Goyal <akhil.goyal@nxp.com>
Wed, 17 Apr 2019 10:28:14 +0000 (15:58 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Thu, 18 Apr 2019 14:01:28 +0000 (16:01 +0200)
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>
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
drivers/crypto/dpaa_sec/dpaa_sec.c

index 5b72b9e..0d273bb 100644 (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);
        }
index 8305f19..d9a7cd8 100644 (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);
        }