>-----Original Message-----
>From: Mcnamara, John <[email protected]>
>Sent: 14 November 2018 20:35
>To: Sahu, Sunila <[email protected]>
>Cc: [email protected]; Athreya, Narayana Prasad
><[email protected]>; Murthy, Nidadavolu
><[email protected]>; Gupta, Ashish <[email protected]>; De
>Lara Guarch, Pablo
><[email protected]>; Verma, Shally <[email protected]>
>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
>
>