diff mbox series

[v3,09/29] crypto/cnxk: clear session data before populating

Message ID 1639732811-1440-10-git-send-email-anoobj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers show
Series New features and improvements in cnxk crypto PMD | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Anoob Joseph Dec. 17, 2021, 9:19 a.m. UTC
Clear session data before populating fields to not have garbage data.

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


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)