Don't check for NULL before calling a free routine. This gets X509_.*free:
x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free
X509_STORE_free X509_STORE_CTX_free X509_PKEY_free
X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/openssl.pod .... Documentation of OpenSSL `openssl' command
crypto/crypto.pod ... Documentation of OpenSSL crypto.h (libcrypto)
ssl/ssl.pod ......... Documentation of OpenSSL ssl.h (libssl)
standards.txt ....... Pointers to standards, RFCs or internet drafts
that are related to OpenSSL. Incomplete.
HTML versions are on https://www.openssl.org/docs