diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-04-23 09:00:20 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-04-23 09:00:20 +0000 |
commit | b2a408bf018aafea96c9ad928a8627c1de36d24e (patch) | |
tree | 174758198747f1090b3dddd1b4a638649858229c /lib | |
parent | 471249f9583bf785d75668f966ebc45efb981148 (diff) |
Make X509_CRL_METHOD_free() NULL-safe.
ok bcook
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/asn1/x_crl.c | 4 |
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); } |