DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/qat: fix a memory leak in error branch
@ 2022-02-19  5:31 Weiguo Li
  0 siblings, 0 replies; only message in thread
From: Weiguo Li @ 2022-02-19  5:31 UTC (permalink / raw)
  To: roy.fan.zhang; +Cc: declan.doherty, dev

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/crypto/qat/qat_sym_session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 8ca475ca8b..fa7d020d0e 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1410,6 +1410,7 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
 		memset(in, 0, ICP_QAT_HW_GALOIS_H_SZ);
 		if (AES_set_encrypt_key(auth_key, auth_keylen << 3,
 			&enc_key) != 0) {
+			rte_free(in);
 			return -EFAULT;
 		}
 		AES_encrypt(in, out, &enc_key);
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-19  5:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-19  5:31 [PATCH] crypto/qat: fix a memory leak in error branch Weiguo Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).