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:32:29 +0000 (15:32 -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)

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

index f94d04c..a5871ca 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 d704962..7406a68 100644 (file)
@@ -207,8 +207,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,