From: "Ji, Kai" <kai.ji@intel.com>
To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "anoobj@marvell.com" <anoobj@marvell.com>,
Akhil Goyal <gakhil@marvell.com>
Subject: RE: [PATCH] crypto/openssl: fix memory leak
Date: Wed, 17 May 2023 16:49:22 +0000 [thread overview]
Message-ID: <SN6PR11MB34088DFD0F8B8A41CFCB8D93817E9@SN6PR11MB3408.namprd11.prod.outlook.com> (raw)
In-Reply-To: <96b2fd6a6341603426ad79f71c4bcf1342460e71.1684341281.git.gmuthukrishn@marvell.com>
Hi gowrishankar,
Is that the same fix ?
https://patches.dpdk.org/project/dpdk/patch/20230511135944.142416-1-ciara.power@intel.com/
regards
Kai
> -----Original Message-----
> From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Sent: Wednesday, May 17, 2023 5:45 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Akhil Goyal <gakhil@marvell.com>; Ji, Kai
> <kai.ji@intel.com>; Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Subject: [PATCH] crypto/openssl: fix memory leak
>
> Memory allocated through OPENSSL_malloc should be freed only through
> OPENSSL_free.
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> ---
> drivers/crypto/openssl/rte_openssl_pmd.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c
> b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 384d262621..f65fbca300 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1927,7 +1927,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op
> *cop,
>
> if (EVP_PKEY_sign(dsa_ctx, dsa_sign_data, &outlen, op->message.data,
> op->message.length) <= 0) {
> - free(dsa_sign_data);
> + OPENSSL_free(dsa_sign_data);
> goto err_dsa_sign;
> }
>
> @@ -1935,7 +1935,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op
> *cop,
> DSA_SIG *sign = d2i_DSA_SIG(NULL, &dsa_sign_data_p, outlen);
> if (!sign) {
> OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
> - free(dsa_sign_data);
> + OPENSSL_free(dsa_sign_data);
> goto err_dsa_sign;
> } else {
> const BIGNUM *r = NULL, *s = NULL;
> @@ -1947,7 +1947,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op
> *cop,
> }
>
> DSA_SIG_free(sign);
> - free(dsa_sign_data);
> + OPENSSL_free(dsa_sign_data);
> return 0;
>
> err_dsa_sign:
> --
> 2.25.1
prev parent reply other threads:[~2023-05-17 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 16:44 Gowrishankar Muthukrishnan
2023-05-17 16:48 ` Akhil Goyal
2023-05-17 16:49 ` Ji, Kai [this message]
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=SN6PR11MB34088DFD0F8B8A41CFCB8D93817E9@SN6PR11MB3408.namprd11.prod.outlook.com \
--to=kai.ji@intel.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=gmuthukrishn@marvell.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).