Allow null in X509_CRL_METHOD_free
authorFdaSilvaYY <fdasilvayy@gmail.com>
Tue, 27 Sep 2016 21:36:37 +0000 (23:36 +0200)
committerRich Salz <rsalz@openssl.org>
Mon, 7 Nov 2016 20:48:31 +0000 (15:48 -0500)
and fix documentation.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1634)
(cherry picked from commit 7cb1ecec59d7c8d6628fb9bfd435306f7e06fd33)

crypto/x509/x_crl.c
doc/crypto/X509_dup.pod

index f94d04c37d96958d06a90e4ba778ded3d9cb5ad6..a5871ca6e591821922bf01fe34020d47fe2cf08b 100644 (file)
@@ -441,7 +441,7 @@ X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
 
 void X509_CRL_METHOD_free(X509_CRL_METHOD *m)
 {
-    if (!(m->flags & X509_CRL_METHOD_DYNAMIC))
+    if (m == NULL || !(m->flags & X509_CRL_METHOD_DYNAMIC))
         return;
     OPENSSL_free(m);
 }
index 574994d00c58c565b9a183b9fc19abad78e24a40..c5d01b281f43678e8824430719b30e3705062033 100644 (file)
@@ -208,8 +208,6 @@ X509_CINF_free,
 X509_CINF_new,
 X509_CRL_INFO_free,
 X509_CRL_INFO_new,
-X509_CRL_METHOD_free,
-X509_CRL_METHOD_new,
 X509_CRL_dup,
 X509_CRL_free,
 X509_CRL_new,