Re: [openssl-dev] Is X509_free(NULL) ok?
Ken Goldman <kgoldman-r/[email protected]> Fri, 22 Dec 2017 09:13:02 -0500
| Newsgroups | gmane.comp.encryption.openssl.user,gmane.comp.encryption.openssl.devel |
|---|---|
| Message-ID | <[email protected]> |
On 12/22/2017 8:06 AM, Salz, Rich via openssl-users wrote: > Our intent is that all FREE functions can handle NULL. If you find > things missing or undocumented, please open an issue on GitHub. > Thanks! It would be great if that was documented for all _free() functions. I currently always code if (ptr!= NULL) free(ptr); because the behavior isn't defined. BTW, "can handle" should explicitly say what happens. Perhaps use the C library text, which says: If ptr is NULL, no operation is performed. -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users