[PATCH] crypto/qat: fix a memory leak in error branch
Weiguo Li
liwg06 at foxmail.com
Sat Feb 19 06:31:43 CET 2022
Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
Signed-off-by: Weiguo Li <liwg06 at 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
More information about the dev
mailing list