On Thu, 2 Nov 2023 14:08:31 +0530
Gowrishankar Muthukrishnan <gmuthukri...@marvell.com> wrote:

> +     if (pub_key)
> +             BN_free(pub_key);
> +     if (pkey)
> +             EVP_PKEY_free(pkey);
>  

All these checks for null are unnecessary:

       EVP_PKEY_free() decrements the reference count of key and, if the 
reference count is zero,
       frees it up. If key is NULL, nothing is done.


Let me add those functions to cocci nullfree script as well.

Reply via email to