diff options
author | miod <> | 2014-07-12 14:58:32 +0000 |
---|---|---|
committer | miod <> | 2014-07-12 14:58:32 +0000 |
commit | be62ec7782f11e6015eaa953859a4ea240c4ed8b (patch) | |
tree | b1d347ffdd3c76df9af253450a9dbb01eb287231 /src/lib/libcrypto/ocsp/ocsp_ht.c | |
parent | 253f6c49c29fbea00aba20d557aba42e338399ba (diff) | |
download | openbsd-be62ec7782f11e6015eaa953859a4ea240c4ed8b.tar.gz openbsd-be62ec7782f11e6015eaa953859a4ea240c4ed8b.tar.bz2 openbsd-be62ec7782f11e6015eaa953859a4ea240c4ed8b.zip |
Principle of least surprise: make CMAC_CTX_free(), OCSP_REQ_CTX_free() and
X509_STORE_CTX_free() accept NULL pointers as input without dereferencing them,
like all the other well-behaved *_CTX_free() functions do.
Diffstat (limited to 'src/lib/libcrypto/ocsp/ocsp_ht.c')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ht.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_ht.c b/src/lib/libcrypto/ocsp/ocsp_ht.c index bc3c957b0c..c895e9df4d 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ht.c +++ b/src/lib/libcrypto/ocsp/ocsp_ht.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_ht.c,v 1.19 2014/06/12 15:49:30 deraadt Exp $ */ | 1 | /* $OpenBSD: ocsp_ht.c,v 1.20 2014/07/12 14:58:32 miod Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -108,6 +108,9 @@ static int parse_http_line1(char *line); | |||
108 | void | 108 | void |
109 | OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx) | 109 | OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx) |
110 | { | 110 | { |
111 | if (rctx == NULL) | ||
112 | return; | ||
113 | |||
111 | if (rctx->mem) | 114 | if (rctx->mem) |
112 | BIO_free(rctx->mem); | 115 | BIO_free(rctx->mem); |
113 | free(rctx->iobuf); | 116 | free(rctx->iobuf); |