From: "Verma, Shally" <Shally.Verma@cavium.com>
To: "Mcnamara, John" <john.mcnamara@intel.com>,
"Sahu, Sunila" <Sunila.Sahu@cavium.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Athreya, Narayana Prasad" <NarayanaPrasad.Athreya@cavium.com>,
"Murthy, Nidadavolu" <Nidadavolu.Murthy@cavium.com>,
"Gupta, Ashish" <Ashish.Gupta@cavium.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Subject: Re: [dpdk-dev] [PATCH v5 1/3] crypto/openssl: add rsa and mod asym op
Date: Thu, 15 Nov 2018 08:33:58 +0000 [thread overview]
Message-ID: <SN6PR07MB51527B4786B6B42EE483633BF0DC0@SN6PR07MB5152.namprd07.prod.outlook.com> (raw)
In-Reply-To: <B27915DBBA3421428155699D51E4CFE23F479E2F@IRSMSX103.ger.corp.intel.com>
>-----Original Message-----
>From: Mcnamara, John <john.mcnamara@intel.com>
>Sent: 14 November 2018 20:35
>To: Sahu, Sunila <Sunila.Sahu@cavium.com>
>Cc: dev@dpdk.org; Athreya, Narayana Prasad <NarayanaPrasad.Athreya@cavium.com>; Murthy, Nidadavolu
><Nidadavolu.Murthy@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; De Lara Guarch, Pablo
><pablo.de.lara.guarch@intel.com>; Verma, Shally <Shally.Verma@cavium.com>
>Subject: RE: [dpdk-dev] [PATCH v5 1/3] crypto/openssl: add rsa and mod asym op
>
>External Email
>
>> +err_rsa:
>> + if (n)
>> + BN_free(n);
>> + if (e)
>> + BN_free(e);
>> + if (d)
>> + BN_free(d);
>> + if (p)
>> + BN_free(p);
>> + if (q)
>> + BN_free(q);
>> + if (dmp1)
>> + BN_free(dmp1);
>> + if (dmq1)
>> + BN_free(dmq1);
>> + if (iqmp)
>> + BN_free(iqmp);
>> +
>
>Hi,
>
>I don't think the if() test is required prior to calling BN_free().
>
>The docs say: "If a is NULL, nothing is done.":
>
> https://www.openssl.org/docs/manmaster/man3/BN_free.html
Ok. will see and get back to you. Would like to test with different openssl versions, if all follow same rule no issues.
Thanks
Shally
>
>I mention this because the code above is also in Coverity defect 305854.
>
>Could you look at that and provide a fix.
>
>Thanks.
>
>John
>
>
next prev parent reply other threads:[~2018-11-15 8:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 14:46 [dpdk-dev] [PATCH v5 0/3]crypto/openssl: support asymmetric crypto Shally Verma
2018-07-23 14:46 ` [dpdk-dev] [PATCH v5 1/3] crypto/openssl: add rsa and mod asym op Shally Verma
2018-07-23 16:50 ` Stephen Hemminger
2018-07-23 16:55 ` Verma, Shally
2018-11-14 15:04 ` Mcnamara, John
2018-11-15 8:33 ` Verma, Shally [this message]
2018-07-23 14:46 ` [dpdk-dev] [PATCH v5 2/3] crypto/openssl: add dh and dsa " Shally Verma
2018-07-23 14:46 ` [dpdk-dev] [PATCH v5 3/3] doc: add asym feature list Shally Verma
2018-07-24 16:19 ` [dpdk-dev] [PATCH v5 0/3]crypto/openssl: support asymmetric crypto De Lara Guarch, Pablo
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=SN6PR07MB51527B4786B6B42EE483633BF0DC0@SN6PR07MB5152.namprd07.prod.outlook.com \
--to=shally.verma@cavium.com \
--cc=Ashish.Gupta@cavium.com \
--cc=NarayanaPrasad.Athreya@cavium.com \
--cc=Nidadavolu.Murthy@cavium.com \
--cc=Sunila.Sahu@cavium.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=pablo.de.lara.guarch@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).