>-----Original Message-----
>From: Mcnamara, John <john.mcnam...@intel.com>
>Sent: 14 November 2018 20:35
>To: Sahu, Sunila <sunila.s...@cavium.com>
>Cc: dev@dpdk.org; Athreya, Narayana Prasad 
><narayanaprasad.athr...@cavium.com>; Murthy, Nidadavolu
><nidadavolu.mur...@cavium.com>; Gupta, Ashish <ashish.gu...@cavium.com>; De 
>Lara Guarch, Pablo
><pablo.de.lara.gua...@intel.com>; Verma, Shally <shally.ve...@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
>
>

Reply via email to