From: FdaSilvaYY Date: Tue, 27 Sep 2016 21:36:37 +0000 (+0200) Subject: Allow null in X509_CRL_METHOD_free X-Git-Tag: OpenSSL_1_1_0c~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6fa4d63dbf26c7ec57407edd7987d8036e0a5ee5;p=oweals%2Fopenssl.git Allow null in X509_CRL_METHOD_free and fix documentation. Reviewed-by: Tim Hudson Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1634) (cherry picked from commit 7cb1ecec59d7c8d6628fb9bfd435306f7e06fd33) --- diff --git a/crypto/x509/x_crl.c b/crypto/x509/x_crl.c index f94d04c37d..a5871ca6e5 100644 --- a/crypto/x509/x_crl.c +++ b/crypto/x509/x_crl.c @@ -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); } diff --git a/doc/crypto/X509_dup.pod b/doc/crypto/X509_dup.pod index 574994d00c..c5d01b281f 100644 --- a/doc/crypto/X509_dup.pod +++ b/doc/crypto/X509_dup.pod @@ -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,