Clear session data before populating fields to not have garbage data.

Signed-off-by: Anoob Joseph <ano...@marvell.com>
---
 drivers/crypto/cnxk/cn10k_ipsec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/cnxk/cn10k_ipsec.c 
b/drivers/crypto/cnxk/cn10k_ipsec.c
index 93eab1b..1bd127e 100644
--- a/drivers/crypto/cnxk/cn10k_ipsec.c
+++ b/drivers/crypto/cnxk/cn10k_ipsec.c
@@ -130,6 +130,8 @@ cn10k_ipsec_inb_sa_create(struct roc_cpt *roc_cpt,
        sa = &sess->sa;
        in_sa = &sa->in_sa;
 
+       memset(in_sa, 0, sizeof(struct roc_ot_ipsec_inb_sa));
+
        /* Translate security parameters to SA */
        ret = cnxk_ot_ipsec_inb_sa_fill(in_sa, ipsec_xfrm, crypto_xfrm);
        if (ret)
-- 
2.7.4

Reply via email to