summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-04-23 09:00:20 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-04-23 09:00:20 +0000
commitb2a408bf018aafea96c9ad928a8627c1de36d24e (patch)
tree174758198747f1090b3dddd1b4a638649858229c /lib
parent471249f9583bf785d75668f966ebc45efb981148 (diff)
Make X509_CRL_METHOD_free() NULL-safe.
ok bcook
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/asn1/x_crl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/x_crl.c b/lib/libcrypto/asn1/x_crl.c
index e0e6cc88633..9ab37c35484 100644
--- a/lib/libcrypto/asn1/x_crl.c
+++ b/lib/libcrypto/asn1/x_crl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_crl.c,v 1.30 2018/03/17 14:33:20 jsing Exp $ */
+/* $OpenBSD: x_crl.c,v 1.31 2018/04/23 09:00:19 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -675,7 +675,7 @@ 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;
free(m);
}