From: "Mcnamara, John" <john.mcnamara@intel.com>
To: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"pathreya@caviumnetworks.com" <pathreya@caviumnetworks.com>,
"nmurthy@caviumnetworks.com" <nmurthy@caviumnetworks.com>,
Ashish Gupta <ashish.gupta@caviumnetworks.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
Shally Verma <shally.verma@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH v5 1/3] crypto/openssl: add rsa and mod asym op
Date: Wed, 14 Nov 2018 15:04:32 +0000 [thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE23F479E2F@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1532357165-8575-2-git-send-email-shally.verma@caviumnetworks.com>
> +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
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-14 15:04 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 [this message]
2018-11-15 8:33 ` Verma, Shally
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=B27915DBBA3421428155699D51E4CFE23F479E2F@IRSMSX103.ger.corp.intel.com \
--to=john.mcnamara@intel.com \
--cc=ashish.gupta@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=nmurthy@caviumnetworks.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=pathreya@caviumnetworks.com \
--cc=shally.verma@caviumnetworks.com \
--cc=sunila.sahu@caviumnetworks.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).