[openssl-users] [openssl-dev] Is X509_free(NULL) ok?

Ken Goldman kgoldman at us.ibm.com
Fri Dec 22 14:30:19 UTC 2017

On 12/22/2017 9:24 AM, Salz, Rich via openssl-users wrote:
>> 	if (ptr!= NULL) free(ptr);
> That shouldn’t be necessary for OpenSSL.  If you find places where it is, please open an issue.

OK.  I'll mention a few, but it's a global issue.

The code may handle NULL.  However, conservative users won't go by what 
the code happens to do today.  We have to go by the API documentation, 
which is the contract between the library and the user.  If the API is 
silent, we cautiously assume it's not guaranteed, and can change in the 

More information about the openssl-users mailing list