DPDK patches and discussions
 help / color / mirror / Atom feed
From: Weiguo Li <liwg06@foxmail.com>
To: roy.fan.zhang@intel.com
Cc: declan.doherty@intel.com, dev@dpdk.org
Subject: [PATCH] crypto/qat: fix a memory leak in error branch
Date: Sat, 19 Feb 2022 13:31:43 +0800	[thread overview]
Message-ID: <tencent_A66484A10EC9B7C6C89E4851CC118FC52906@qq.com> (raw)

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


                 reply	other threads:[~2022-02-19  5:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_A66484A10EC9B7C6C89E4851CC118FC52906@qq.com \
    --to=liwg06@foxmail.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=roy.fan.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).